Skip to content

Commit b4c94c2

Browse files
committed
add vertical toc
1 parent c75d3c8 commit b4c94c2

File tree

1 file changed

+44
-0
lines changed

1 file changed

+44
-0
lines changed

assets/css/extended/toc.css

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
.toc {
2+
padding: 14px;
3+
border: solid 1px lightgray;
4+
font-size: 16px;
5+
}
6+
7+
@media (min-width: 1280px) {
8+
.toc {
9+
position: sticky;
10+
float: left;
11+
--toc-left: calc(100vw / 50);
12+
left: var(--toc-left); /* _minimum_ distance from left screen border */
13+
top: 100px;
14+
margin-left: -1000px; /* overruled by left */
15+
16+
width: calc((100vw - var(--main-width) - 2 * var(--gap)) / 2 - 2 * var(--toc-left));
17+
padding: 14px;
18+
border: solid 1px lightgray;
19+
font-size: 16px;
20+
}
21+
22+
.toc .inner {
23+
padding: 0;
24+
}
25+
26+
.toc details summary {
27+
margin-inline-start: 0;
28+
margin-bottom: 10px;
29+
}
30+
31+
}
32+
33+
tr {
34+
vertical-align: baseline;
35+
}
36+
37+
38+
summary {
39+
cursor: pointer !important;
40+
}
41+
42+
.clearright {
43+
clear: right;
44+
}

0 commit comments

Comments
 (0)