-
Notifications
You must be signed in to change notification settings - Fork 131
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
make CSS agnostic of light/dark schemes #734
Comments
hardcoded colors that could be made agnostic of BG color:
The following is subject to #733:
|
Thanks for reporting this!
I would like to fix this at some point, but I'm still too confused about how to do that. Sphinx has hardly any support for a dark theme, and many third party themes use quite different technologies for their dark themes. I think this makes it basically impossible to be working correctly on all themes. The idea with transparency sounds nice, but I guess it can only be used in a few situation and not as a general strategy, right? For comparison, this is how the JupyterLab dark theme looks like: |
I don't think dark mode is a Sphinx support issue. It can be done with HTML and CSS templates.
Sort of. From what I've seen, light/dark modes are typically toggled using an attribute on the DOM CSS has a
If you absolutely want the color to be opaque, then it is harder to satisfy this. But I would recommend the aforementioned CSS media feature when transparency isn't preferrable. Changing the foreground color makes sense, but it should really only be done if changing the background color to something opaque (as is done for certain rows of tables in nbsphinx). |
I noticed a problem with the furo theme example: The background color for stderr output isn't compatible with the dark scheme:
but using a transparency with slightly increased saturation should remedy that in a consistent way for light or dark schemes:
There are other styles that use opaque hard-coded colors which don't blend well with light and dark schemes. I'll update this thread with other related findings...
The text was updated successfully, but these errors were encountered: