Debian Codegraph @

src/pydata_sphinx_theme/assets/styles/components/_switcher-version.scss

raw
1 button.btn.version-switcher__button {
2 border-color: var(--pst-color-border);
3 color: var(--pst-color-text-base);
4
5 // Add a margin on narrow screens to avoid feeling cramped
6 margin-bottom: 1em;
7
8 @include media-breakpoint-up($breakpoint-sidebar-primary) {
9 margin-bottom: unset;
10 }
11
12 &:hover {
13 box-shadow: 0 0 0 $focus-ring-width var(--pst-color-secondary);
14 border-color: transparent;
15 }
16
17 &:active {
18 color: var(--pst-color-text-base);
19 border-color: var(--pst-color-border);
20 }
21
22 &:focus-visible {
23 border-color: transparent;
24 }
25 }
26
27 .version-switcher__menu {
28 border-color: var(--pst-color-border);
29 border-radius: var(--bs-dropdown-border-radius);
30
31 a.list-group-item {
32 background-color: var(--pst-color-on-background);
33 color: var(--pst-color-text-base);
34 padding: 0.75rem 1.25rem;
35
36 &:not(:last-child) {
37 border-bottom: 1px solid var(--pst-color-border);
38 }
39
40 &:hover {
41 @include link-style-hover;
42
43 background-color: var(--pst-color-surface);
44 }
45
46 &.active {
47 @include link-sidebar-current;
48
49 position: relative;
50 z-index: 1;
51
52 span::before {
53 content: "";
54 width: 100%;
55 height: 100%;
56 position: absolute;
57 z-index: -1;
58 left: 0;
59 top: 0;
60 }
61 }
62
63 &:focus-visible {
64 z-index: 10; // keep focus ring on top (prevent the hover background of the next dropdown item from covering the ring)
65 }
66 }
67 }
68
69 // Font behavior on mobile
70 button.version-switcher__button,
71 .version-switcher__menu {
72 font-size: 1.1em; // A bit smaller than other menu font
73 z-index: $zindex-modal; // higher than the sidebars
74
75 // Make sure it meets WCAG target size requirement no matter the version
76 // string displayed in the button
77 @include min-hit-area;
78
79 @include media-breakpoint-up($breakpoint-sidebar-primary) {
80 font-size: unset;
81 }
82 }