Closed mseele closed 1 week ago
Dark mode is well-supported in Rustdoc. Seems logical to support it here as well.
@mseele do you want to help implement it? :)
@Turbo87 if anyone can help with the visual design (where to place the light/dark button, choice of colors, etc.) I can take a look
unfortunately, that's the same problem we have with crates.io. we have the dev skills to implement it, but visual design is not a strong skill for us 😅
Dark mode (imo) doesn't necessarily need a JavaScript switch button. Using the CSS prefer-color-scheme property, the browser automatically shows the website based on the user preferences (either set in the browser or in the system prefs).
An alternate color set autogenerated by a browser extension could be:
color: #e8e6e3;
background-color: #222;
replacing the SCSS variables with these should get us already to a half-working dark theme
Here's a quick user style I threw together that can be used until this feature is implemented:
@media (prefers-color-scheme: dark) {
body {
background-color: black;
filter: invert(1.0);
}
}
A very simple UserCSS: https://github.com/teohhanhui/rust-blog-dark
sigh you guys pushed me over the cliff #1343 :smile:
aaaand ... it's online! :rocket:
I often read the rust blog in the dark and always wonder why there is no dark mode.
It would be really cool if the rust blog had a dark mode. Is there anything against it?