-
Notifications
You must be signed in to change notification settings - Fork 3
/
sidetoc.css
51 lines (47 loc) · 1.04 KB
/
sidetoc.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
/* Allocate a single column when the width of the page is small. */
.post-single {
display: grid;
grid-template-columns: minmax(0, 1fr);
grid-column-gap: 20px;
}
/* Allocate two columns when there is enough width. *
* The ToC is placed in the second column, while the rest of
* the children are placed in the first column. */
@media (min-width: 1200px) {
.post-single {
grid-template-columns: minmax(0, 3fr) minmax(0, 1fr);
}
.post-single .toc {
grid-column: 2;
position: sticky;
top: 10px;
}
}
.post-single .post-header {
grid-column: 1;
width: 100%;
}
.post-single .entry-cover {
grid-column: 1;
}
.post-single .post-content {
grid-column: 1;
}
.post-single .post-footer {
grid-column: 1;
}
.post-single .toc {
height: fit-content;
grid-row: span 3;
}
/* Make the ToC scrollable */
.post-single .toc #TableOfContents {
overflow-y: auto;
overflow-x: auto;
padding-left: 20px;
max-height: 70vh;
}
.post-single .toc .inner {
margin: 5px;
padding: 0;
}