Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

User color scheme preferences (aka dark mode) #2

Open
rafaelcastrocouto opened this issue Sep 23, 2021 · 1 comment
Open

User color scheme preferences (aka dark mode) #2

rafaelcastrocouto opened this issue Sep 23, 2021 · 1 comment
Labels
enhancement New feature or request

Comments

@rafaelcastrocouto
Copy link

rafaelcastrocouto commented Sep 23, 2021

With a few lines you can add support for user color schemes:

minimal.css

@media (prefers-color-scheme: dark) {
  body, code, pre { background:  #333; color: white; }
  h1, h2, strong { color: white; }
}
minimal-inputs.css

@media (prefers-color-scheme: dark) {
  input, input[type="text"], input[type="password"], input[type="email"], input[type="tel"], select, textarea { 
    background:  #444; 
    color: white; 
  }
}

Maybe they could go to a file called dark.css, I don't know ... it's your choice.

Ref: https://developer.mozilla.org/en-US/docs/Web/CSS/@media/prefers-color-scheme

@chr15m
Copy link
Owner

chr15m commented Sep 24, 2021

Excellent, thank you!

@chr15m chr15m added the enhancement New feature or request label Sep 24, 2021
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants