Skip to content
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

code output is hard to read in dark mode #20

Closed
scott-huberty opened this issue Oct 30, 2023 · 3 comments · Fixed by #21
Closed

code output is hard to read in dark mode #20

scott-huberty opened this issue Oct 30, 2023 · 3 comments · Fixed by #21
Labels
extension Bug or improvements for Sphinx extensions

Comments

@scott-huberty
Copy link

scott-huberty commented Oct 30, 2023

As you can see in the tutorial for this package, In dark mode, there are 2 UX issues:

  1. The "out" box for code generation is beige and has low contrast. FYI, this code is generated with sphinx gallery, a sphinx extension widely used in the pydata community.

Screen Shot 2023-10-30 at 5 44 08 PM

  1. In the Xarrray _html_repr_ output, some tables display light with low contrast:

Screen Shot 2023-10-30 at 5 44 45 PM

I think we can check how Xarray formats their documentation in dark mode (i.e. see this tutorial), to get an idea on how to format the shibuya darkmode so that these tables render nicely in dark mode (FYI, looks like they are using pydata_sphinx_theme):

Screen Shot 2023-10-30 at 5 47 56 PM

As always, I am happy to help in the form of a PR, if you can tell me which module/file we need to fix!

@scott-huberty scott-huberty changed the title Shibuya Dark theme code output is hard to read code output is hard to read in dark mode Oct 30, 2023
@lepture
Copy link
Owner

lepture commented Nov 24, 2023

@scott-huberty you can follow https://shibuya.lepture.com/contributing/#development for developing

And check this PR #18 for adding a new extension.

@lepture lepture added the extension Bug or improvements for Sphinx extensions label Dec 17, 2023
@lepture
Copy link
Owner

lepture commented Dec 31, 2023

@scott-huberty 2024.1.1 released.

@scott-huberty
Copy link
Author

Thanks @lepture ! I apologize that I did not have time to work on this ticket.

By the way, I did discover that Sphinx-Gallery added support for dark mode in #sphinx-gallery/sphinx-gallery#948 .

However this support will only work if the upstream sphinx template (i.e. Shibuya, Furo, etc) specifies a data-theme variable in an <html> tag (see #sphinx-gallery/sphinx-gallery#1221) for more info.

I think your fix (adding custom css) is a good alternative to that, but just FYI!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
extension Bug or improvements for Sphinx extensions
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants