Skip to content

Commit 5ee27af

Browse files
committed
Test-run for side-by-side ToC by applying to CSSWG specs
1 parent 0747132 commit 5ee27af

1 file changed

Lines changed: 34 additions & 0 deletions

File tree

default.css

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,40 @@
1010
line-height: 1.5;
1111
}
1212

13+
/** Test-run Side-by-side ToC **/
14+
15+
16+
@media screen and (min-width: 60em) {
17+
[role=navigation]#toc,
18+
[data-fill-with="table-of-contents"][role=navigation] {
19+
position: fixed;
20+
top: 0; bottom: 0;
21+
left: 26px;
22+
width: 30%;
23+
overflow: auto;
24+
padding: 0 1em;
25+
background: white;
26+
box-shadow: 3px 0 3px;
27+
}
28+
body {
29+
padding-left: 40% !important;
30+
padding-left: calc(26px + 4em + 30%) !important;
31+
}
32+
[role=navigation]#toc h2 {
33+
margin-top: 1rem;
34+
}
35+
}
36+
@media screen and (min-width: 80em) {
37+
[role=navigation]#toc,
38+
[data-fill-with="table-of-contents"][role=navigation] {
39+
width: 25.5em;
40+
}
41+
body {
42+
padding-left: 31em !important;
43+
padding-left: calc(26px + 29.5em) !important;
44+
}
45+
}
46+
1347
/******************************************************************************/
1448
/* Sectioning */
1549
/******************************************************************************/

0 commit comments

Comments
 (0)