-
Notifications
You must be signed in to change notification settings - Fork 23
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
Add support for light and dark Pygments style #1727
Comments
Thanks for your kind words. I'll take a look how the |
Hope this gets added some day, will be really helpful! |
Just wanted to note my observations so that I don't forget.
I'm not keen on maintaining custom code that works around Sphinx's (or Pygments in this case) features. I've tried doing this in earlier versions of this theme, and it was painful, because even updates of minor versions often caused things to break. So, I want to suggest this workaround for now:
|
It seems like you can prepend ".dark" by using: |
Even better! |
Explain what you have to do to add different color schemes for syntax highlighting, originally explained in #1727.
First, thank you so much for creating the Sphinx Awesome theme!
Currently, it seems like Sphinx Awesome can only support one Pygments style. While this is great, this behavior does not work well with both dark and light themes. Depending on the selected Pygments style, it will only function well with either light or dark themes, but not both.
It would be fantastic to add support for two separate Pygments styles: one for dark mode and another for light mode.
For example, you can see how the PyData theme implements separate styles (see "Configure Pygments theme"):
https://pydata-sphinx-theme.readthedocs.io/en/stable/user_guide/styling.html#configure-pygments-theme
The text was updated successfully, but these errors were encountered: