-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Description
What is your issue?
The Xarray HTML repr assumes that light vs dark theming is stored in the html
element's theme
attribute (i.e., <html theme="dark">
or <html theme="light">
).
However, the Sphinx Furo theme assumes that light vs dark theming is stored in the body
element's data-theme
attribute. As a result, if you use the Sphinx Furo theme for documentation and use Xarray HTML reprs, the Xarray HTML reprs do not display properly.
In truth, it seems that this comes down to the light vs dark theming not being standardized, which presents a problem of how to support multiple (possibly innumerable) different ways of specifying light or dark themes. That said, the Sphinx Furo theme has growing popularity, and I wonder if it could be supported as a special case (as is vscode dark themes).
To do this, one would need only modify one line of xarray/static/css/style.css:
xarray/xarray/static/css/style.css
Lines 16 to 17 in 0db3440
html[theme=dark], | |
body.vscode-dark { |
to:
html[theme=dark],
body[data-theme=dark],
body.vscode-dark {
If this is something that the Xarray community would support, I'm happy to put together a PR to do this.