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

Provide a default class to the body for dark mode #284

Open
kevindeyne opened this issue Aug 3, 2022 · 0 comments
Open

Provide a default class to the body for dark mode #284

kevindeyne opened this issue Aug 3, 2022 · 0 comments
Labels
enhancement New feature or request minor rewrite

Comments

@kevindeyne
Copy link
Member

kevindeyne commented Aug 3, 2022

Can figure that out via

//default to dark mode
if(!window.matchMedia || !window.matchMedia('(prefers-color-scheme: dark)').matches) {
toggleDarkMode(); //turn on light mode
}

But need to remember that in localstorage, etc. Would be better if this can be determined at servertime.

@kevindeyne kevindeyne added enhancement New feature or request minor labels Aug 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request minor rewrite
Projects
None yet
Development

No branches or pull requests

1 participant