-
Notifications
You must be signed in to change notification settings - Fork 666
Respect @media (prefers-color-scheme: dark)
by adding a "dark theme"
#2076
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
Respect @media (prefers-color-scheme: dark)
by adding a "dark theme"
#2076
Conversation
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @carols10cents (or someone else) soon. If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. Due to the way GitHub handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes. Please see the contribution instructions for more information. |
Thanks for contributing! I haven't discussed this work with the team, but if the decision is to move forward on this, we might want to figure out percy tests so we don't have regressions later on. |
A dark theme sounds like a good idea! I haven't reviewed this PR, but in principle I'm in favour of merging this. Percy tests for this would be awesome as well. |
☔ The latest upstream changes (presumably #2102) made this pull request unmergeable. Please resolve the merge conflicts. |
Thank you for updating the PR! |
☔ The latest upstream changes (presumably #2111) made this pull request unmergeable. Please resolve the merge conflicts. |
☔ The latest upstream changes (presumably #2283) made this pull request unmergeable. Please resolve the merge conflicts. |
☔ The latest upstream changes (presumably #2310) made this pull request unmergeable. Please resolve the merge conflicts. |
☔ The latest upstream changes (presumably #2332) made this pull request unmergeable. Please resolve the merge conflicts. |
@JonathanHelianthicusDoe hey, sorry this has been lingering for so long. the plan is to significantly revamp the whole design of the page in the next months and this dark scheme support would conflict with those plans at the moment. we can revisit this idea after the new design has landed though. due to these reasons I'll go ahead and close this PR for now. sorry! 😞 |
That sounds like the greatest opportunity to think dark theme-first. |
/cc @pichfl |
It's been a while, any updates on a dark theme? |
This adds some new
@media
queries to change the look of crates.io to a dark theme that respects the original design, any time the user agent hasprefers-color-scheme: dark
.See the relevant MDN entry. Also note that in Firefox you can set
ui.systemUsesDarkTheme
to1
(as an integer, not a string nor a boolean) to causeprefers-color-scheme
to have the valuedark
.The changes made are based on a usercss that I created. The usercss itself is actually CC BY-SA 4.0+ licensed, but just to be clear, I do of course license the contents of this PR dually under the MIT license and version 2.0 of the Apache license.