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

rustdoc: Automatic light/dark theme #61079

Closed
fenhl opened this issue May 23, 2019 · 1 comment · Fixed by #61236
Closed

rustdoc: Automatic light/dark theme #61079

fenhl opened this issue May 23, 2019 · 1 comment · Fixed by #61236
Labels
C-feature-request Category: A feature request, i.e: not implemented / a PR. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.

Comments

@fenhl
Copy link
Contributor

fenhl commented May 23, 2019

Websites can now automatically switch between light and dark themes based on system settings using prefers-color-scheme. It would be nice if rustdoc had a theme that looks like the light theme by default but looks like the dark theme in the @media (prefers-color-scheme: dark) condition. Since this is backward-compatible with the current default being the light theme, it could even be made the new default.

@jonas-schievink jonas-schievink added C-feature-request Category: A feature request, i.e: not implemented / a PR. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. labels May 23, 2019
@GuillaumeGomez
Copy link
Member

We can't do it through CSS directly, however it's possible to have a workaround with JS. I'll give it a try soon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-feature-request Category: A feature request, i.e: not implemented / a PR. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants