Skip to content

Commit be2f9f9

Browse files
authored
Update custom.css
1 parent bf223fa commit be2f9f9

1 file changed

Lines changed: 23 additions & 0 deletions

File tree

docs/source/_static/custom.css

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,26 @@
1+
/* ------------------------------------------------------------------ */
2+
/* Force light colour scheme regardless of OS/browser preference. */
3+
/* */
4+
/* pydata-sphinx-theme respects color_mode:'light' in conf.py by */
5+
/* setting data-theme="light" on <html>, but still ships a */
6+
/* prefers-color-scheme:dark media block. The rules below override */
7+
/* that block so the docs always render in light mode. */
8+
/* ------------------------------------------------------------------ */
9+
10+
/* Prevent native browser controls (inputs, scrollbars, etc.) */
11+
/* from switching to dark variants. */
12+
:root {
13+
color-scheme: light !important;
14+
}
15+
16+
/* Re-assert light variables if the theme's dark media query fires. */
17+
@media (prefers-color-scheme: dark) {
18+
html[data-theme="light"],
19+
html:not([data-theme="dark"]) {
20+
color-scheme: light;
21+
}
22+
}
23+
124
/* ------------------------------------------------------------------ */
225
/* Headshot grid used on contributor/team pages */
326
/* ------------------------------------------------------------------ */

0 commit comments

Comments
 (0)