forked from PreTeXtBook/CSS_core
-
Notifications
You must be signed in to change notification settings - Fork 0
/
toc_default.css
103 lines (88 loc) · 2.29 KB
/
toc_default.css
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
#toc {
/* IMPORTANT height must be calculated by javascript. */
width: 240px;
margin: 0;
font-size: 14.72px;
overflow-y: auto;
overflow-x: hidden;
}
/* Aligns toc to the top and side of the allotted space, respectively */
#toc ul {
margin: 0px;
padding: 0px;
}
/* Places section titles */
#toc .title {
margin-left: 1.4em;
display: inline-block;
}
/* Places codenumbers */
#toc .codenumber {
position: absolute;
margin-right: 0;
margin-left: 0em;
/*
margin-top: 0.4px;
*/
left: 0.3em;
display: inline-block;
}
#toc .part > a .codenumber {
position: relative;
display: block;
float: left;
margin-right: 0.7em;
}
#toc .part > a .title {
display: block;
margin-left: 1em;
}
#toc ul li a {
position: relative;
display: block;
padding: 2.86957px;
padding-left: 1.6em;
border-top: 1px solid #d1d1d1;
border-bottom: 1px solid #d1d1d1;
}
/* Sets spacing between section headings*/
#toc > ul > li:not(:first-child) {
margin-top: 0.3em;
}
/* But not at the start of a part */
/* I cannot see that this actually does anything --DF */
#toc > ul > li.part + li,
#toc > ul > li.frontmatter + li,
#toc > ul > li.backmatter + li {
margin-top: 0;
}
/* Removes underlines from links in toc */
#toc ul li a, #toc ul li a:link, #toc ul li a:visited, #toc ul li a:hover, #toc ul li a:focus, #toc ul li a:active {
text-decoration: none;
}
#toc > ul > li > a, #toc > ul > li > a:link, #toc > ul > li > a:visited {
font-weight: bold;
font-family: "PT Serif", "Times New Roman", Times, serif;
padding-left: 0.2em;
}
/* Ensures that there is no double border between subsections */
#toc ul li ul a {
border-top: none;
}
/* Allows both "top" and bottom border of a subsection to be highlighted on hover */
#toc ul li ul a:hover {
border-top: 1px solid #3c110a;
margin-top: -1px;
}
/* Removes the excess space between the last subsection and the next section (caused by
the margin on top of sections being used to space out adjacent sections) */
#toc ul li ul li:last-child {
margin-bottom: -0.3em;
}
/* Removes double border between last subsection and next section */
#toc ul li ul li:last-child a {
border-bottom: none;
}
#toc ul li a:active {
box-shadow: rgba(0, 0, 0, 0.5) 0 2px 5px inset;
}