|
| 1 | +/* |
| 2 | + * sphinx-tabs ships tabs.css for themes that set body[data-theme=...] (e.g. Furo). |
| 3 | + * PyData / NVIDIA Sphinx theme uses html[data-bs-theme=light|dark|auto] instead, so |
| 4 | + * those dark rules never match and tab panels / the active tab stay white in dark mode. |
| 5 | + * tabs.css may override generic rules, so we use .sphinx-tabs ... selectors for |
| 6 | + * higher specificity and Bootstrap surface tokens that track the color mode switcher. |
| 7 | + */ |
| 8 | +/* Tab row divider: keep separation line aligned with theme border color. */ |
| 9 | +.sphinx-tabs [role="tablist"] { |
| 10 | + border-bottom: 1px solid var(--pst-color-border, #a0b3bf); |
| 11 | +} |
| 12 | + |
| 13 | +/* Inactive tab labels: use theme link color and transparent background. */ |
| 14 | +.sphinx-tabs .sphinx-tabs-tab { |
| 15 | + color: var(--pst-color-link, #1d5c87); |
| 16 | + background-color: transparent; |
| 17 | +} |
| 18 | + |
| 19 | +/* Active tab: connect visually to panel and inherit theme surface/text colors. */ |
| 20 | +.sphinx-tabs .sphinx-tabs-tab[aria-selected="true"] { |
| 21 | + font-weight: 700; |
| 22 | + border: 1px solid var(--pst-color-border, #a0b3bf); |
| 23 | + /* Match panel background to hide the seam between tab and panel. */ |
| 24 | + border-bottom: 1px solid var(--pst-color-surface, #fff); |
| 25 | + /* Preserve sphinx-tabs geometry so the active tab overlaps panel border cleanly. */ |
| 26 | + margin: -1px; |
| 27 | + background-color: var(--pst-color-surface, #fff); |
| 28 | + color: var(--pst-color-text-base, #212529); |
| 29 | +} |
| 30 | + |
| 31 | +/* Tab panel container: theme-aware border/surface/text with original rounded geometry. */ |
| 32 | +.sphinx-tabs .sphinx-tabs-panel { |
| 33 | + border: 1px solid var(--pst-color-border, #a0b3bf); |
| 34 | + margin: 0 -1px -1px -1px; |
| 35 | + border-radius: 0 0 5px 5px; |
| 36 | + border-top: 0; |
| 37 | + background-color: var(--pst-color-surface, #fff); |
| 38 | + color: var(--pst-color-text-base, #212529); |
| 39 | +} |
| 40 | + |
1 | 41 | /* Make sidebar wider to accommodate our long module names. */ |
2 | 42 | .bd-sidebar-primary { |
3 | 43 | flex-basis: 25%; /* default is 20% */ |
|
0 commit comments