File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 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. */
1+ /* Keep native browser controls (scrollbars, form widgets) in their light
2+ variants — pydata's default_mode="light" handles the rest. */
123: 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- }
4+ color-scheme : light;
225}
236
247/* ------------------------------------------------------------------ */
Original file line number Diff line number Diff line change @@ -64,6 +64,11 @@ def setup(app):
6464
6565html_theme = 'pydata_sphinx_theme'
6666
67+ # Force light mode regardless of the visitor's OS preference. pydata-sphinx-theme
68+ # sets data-theme="light" on <html> when default_mode == "light", and the navbar
69+ # theme-switcher is excluded via navbar_end so visitors can't toggle to dark.
70+ html_context = {'default_mode' : 'light' }
71+
6772html_theme_options = {
6873 'logo' : {'text' : 'fvGP' },
6974 'github_url' : 'https://github.com/lbl-camera/fvgp' ,
@@ -73,7 +78,6 @@ def setup(app):
7378 'secondary_sidebar_items' : ['page-toc' ],
7479 'footer_start' : ['copyright' ],
7580 'footer_end' : [],
76- 'color_mode' : 'light' ,
7781}
7882
7983html_static_path = ['_static' ]
You can’t perform that action at this time.
0 commit comments