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 the notion of light and dark themes #31

Open
choldgraf opened this issue Jun 5, 2022 · 2 comments
Open

Support the notion of light and dark themes #31

choldgraf opened this issue Jun 5, 2022 · 2 comments
Labels
type: feature A self-contained enhancement or new feature

Comments

@choldgraf
Copy link
Contributor

A lot of modern websites have some notion of a light and a dark theme, and many Sphinx sites are starting to implement this as well. However, building the proper HTML structure light and dark is kind of tricky and unintuitive for people, though some patterns to do so are fairly standardized. This makes me wonder if the basic-ng theme could be one way to provide components, classes, etc that sub-themes could use to follow best practices in light/dark themes.

A few examples:

  • In the pydata theme we had requests that the logo needed to have a "light" and a "dark" version for packages that didn't have a "dark-friendly" logo by default (as an aside we also needed to have both a logo and a title which may be pretty common for others as well)
  • Using standard class names like light-only and dark-only

...I'm not sure what else, but wanted to throw this idea out there in case it resonated with anybody else. I'm not sure how to encourage best practices without getting too opinionated about what the end-result will be 🤔

@pradyunsg pradyunsg added the type: feature A self-contained enhancement or new feature label Jun 27, 2022
@pradyunsg
Copy link
Owner

I think it makes sense to provide resources / examples for how to do this, so that theme authors can implement this. I'm torn on trying to add dedicated support for this, since:

@pradyunsg
Copy link
Owner

And I'm also fine with saying "hey, do it this way so that it's portable across themes"?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: feature A self-contained enhancement or new feature
Projects
None yet
Development

No branches or pull requests

2 participants