-
Notifications
You must be signed in to change notification settings - Fork 3
/
leading-lines-toc.css
58 lines (47 loc) · 1.67 KB
/
leading-lines-toc.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
/* created by /u/AeronDrake */
.toc li h3:first-child {margin-top: 0px !important;}
.toc a {
color: inherit !important; /*toc specifically wants black text. This resets the headers*/
}
.toc li span:nth-child(2){ /*Allow dot leaders to fill remaining space but not overlap*/
width: auto;
overflow: hidden;
white-space: nowrap;
display: block;
}
.toc li span:nth-child(2):after{
font-family : BookSanity; /*Remove any header styles from dot leaders*/
font-size : 0.317cm;
font-weight : normal;
color : black;
content:
" ........................................"
"........................................."
".........................................";
}
.toc li span:first-child{
float: right;
font-family : BookSanity; /*Remove any header styles from page numbers*/
font-size : 0.317cm;
font-weight : normal;
color : black;
margin-left : 1px; /*Leaves a small space between page numbers and dot leaders*/
}
/*Special cases for headings*/
.toc li h3 span:nth-child(2):after{
content: " "; /*Remove dot leaders on h3*/
}
.toc li h3 {
margin-bottom: 4px !important; /*Special spacing for h3*/
margin-top: 10px !important;
line-height: initial !important; /*For some reason Multi-line h3 line spacing changed*/
}
.toc li h3 span:first-child{
line-height: 1.8em !important; /*Line page numbers up with Multi-line h3 better*/
}
.toc ul ul {
margin-left: 10px !important; /*Original lists intented too much*/
}
.toc>ul>li {
margin-bottom: initial !important; /*margin for list items needs to be removed or 0*/
}