Skip to content

Instantly share code, notes, and snippets.

@elias1435
Created April 16, 2024 15:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save elias1435/3c1a3212b7974d398197f23ee45322d2 to your computer and use it in GitHub Desktop.
Save elias1435/3c1a3212b7974d398197f23ee45322d2 to your computer and use it in GitHub Desktop.
how to enable dark mood in chrome and css media query
# How to emulate/activate prefers-color-scheme on Chrome (Desktop):
1. Press F12 key (or Command+Shift+C on Mac)
2. Click on the tree dots symbol (customize and control DevTools)
3. Point your mouse on the more tools option, and then click in rendering option.
4. The option Emulate CSS media feature prefers-color-scheme near the end it's your destination !
# How to emulate/activate prefers-color-scheme on Chrome (Mobile):
1. Click on the tree dots symbol.
2. Click on Settings.
3. Click on theme.
4. Select you desired option !
@media (prefers-color-scheme: dark) {
.theme-a.adaptive {
background: #753;
color: #dcb;
outline: 5px dashed #000;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment