forked from pydata/pydata-sphinx-theme
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path_toc-inpage.scss
50 lines (41 loc) · 984 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
/* 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.nav-link {
display: block;
padding: 0.125rem 0;
// Padding w/ negative margin so the top TOC item highligh overlaps w/ the TOC border
padding-left: 1rem;
margin-left: -1rem;
color: var(--pst-color-text-muted);
&:hover {
color: var(--pst-color-primary);
text-decoration: none;
}
&.active {
font-weight: 600;
color: var(--pst-color-primary);
background-color: transparent;
border-left: 2px solid var(--pst-color-primary);
}
}
}