forked from pydata/pydata-sphinx-theme
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path_toc-inpage.scss
58 lines (44 loc) · 1 KB
/
_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
52
53
54
55
56
57
58
/* 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 {
.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: $toc-item-padding-y 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,
&[aria-current="true"] {
@include link-sidebar-current;
background-color: transparent;
&:hover {
color: var(--pst-color-link-hover);
}
}
&:focus-visible {
border-radius: $focus-ring-radius;
}
}
}