-
Notifications
You must be signed in to change notification settings - Fork 310
/
_toc-inpage.scss
51 lines (41 loc) · 929 Bytes
/
_toc-inpage.scss
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
/* Collapsing of the TOC sidebar while scrolling */
/* Nav: hide second level (shown on .active) */
nav.page-toc {
// A little extra space before the buttons
margin-bottom: 1rem;
}
.bd-toc .nav,
.list-caption {
.nav {
display: none;
// So we can manually specify a level as visible in the config
&.visible {
display: block;
}
}
> .active > ul {
display: block;
}
}
// Each entry of the in-page TOC
.toc-entry {
display: block;
a > code {
color: var(--pst-color-text-muted);
}
a.nav-link {
display: block;
padding: 0.125rem 0;
// Padding w/ negative margin so the top TOC item highlight overlaps w/ the TOC border
padding-left: 1rem;
margin-left: -1rem;
@include link-sidebar;
&.active {
@include link-sidebar-current;
background-color: transparent;
&:hover {
color: var(--pst-color-link-hover);
}
}
}
}