Debian Codegraph @

src/pydata_sphinx_theme/assets/styles/components/_toc-inpage.scss

raw
1 /* Collapsing of the TOC sidebar while scrolling */
2
3 /* Nav: hide second level (shown on .active) */
4
5 nav.page-toc {
6 // A little extra space before the buttons
7 margin-bottom: 1rem;
8 }
9
10 .bd-toc .nav {
11 .nav {
12 display: none;
13
14 // So we can manually specify a level as visible in the config
15 &.pst-show_toc_level {
16 display: block;
17 }
18 }
19
20 > .active > ul {
21 display: block;
22 }
23 }
24
25 // Each entry of the in-page TOC
26 .toc-entry {
27 display: block;
28
29 a > code {
30 color: var(--pst-color-text-muted);
31 }
32
33 a.nav-link {
34 display: block;
35 padding: $toc-item-padding-y 0;
36
37 // Padding w/ negative margin so the top TOC item highlight overlaps w/ the TOC border
38 padding-left: 1rem;
39 margin-left: -1rem;
40
41 @include link-sidebar;
42
43 &.active,
44 &[aria-current="true"] {
45 @include link-sidebar-current;
46
47 background-color: transparent;
48
49 &:hover {
50 color: var(--pst-color-link-hover);
51 }
52 }
53
54 &:focus-visible {
55 border-radius: $focus-ring-radius;
56 }
57 }
58 }