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

Add dark mode support #1184

Open
mseele opened this issue Jan 4, 2024 · 6 comments
Open

Add dark mode support #1184

mseele opened this issue Jan 4, 2024 · 6 comments

Comments

@mseele
Copy link

mseele commented Jan 4, 2024

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?

@CleanCut
Copy link
Contributor

CleanCut commented Jan 8, 2024

Dark mode is well-supported in Rustdoc. Seems logical to support it here as well.

@Turbo87
Copy link
Member

Turbo87 commented Jan 22, 2024

@mseele do you want to help implement it? :)

@mseele
Copy link
Author

mseele commented Jan 22, 2024

@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

@Turbo87
Copy link
Member

Turbo87 commented Jan 23, 2024

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 😅

@apiraino
Copy link
Contributor

apiraino commented Feb 7, 2024

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

grafik

@fenhl
Copy link

fenhl commented Mar 26, 2024

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);
    }
}

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

No branches or pull requests

5 participants