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

Support for only-light and only-dark classes #658

Closed
choldgraf opened this issue May 9, 2022 · 1 comment · Fixed by #673
Closed

Support for only-light and only-dark classes #658

choldgraf opened this issue May 9, 2022 · 1 comment · Fixed by #673

Comments

@choldgraf
Copy link
Collaborator

choldgraf commented May 9, 2022

Context

Recently we had a conversation where @larsoner shared some JavaScript to swap out images depending on the theme that was active. Another pattern that is out there is using CSS classes, as Furo does. Basically you define a class that makes things only display when one or the other theme is activated.

Proposal

We should add CSS rules for the only-dark and only-light classes, and document their use here. We should try and follow whatever standard Furo set since it seems reasonable and so that we don't create too many different ways of doing the same thing.

Other things we could do with this:

  • Add theme support for html_logo_dark
@larsoner
Copy link
Contributor

larsoner commented May 9, 2022

Indeed I'd rather use this than JS!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants