Skip to main content
Note #61

🕶️ color-scheme is a CSS property that affects the “theme” of a website. You can use it to quickly switch a page to dark mode with:

html {
  color-scheme: dark;

It’s pretty neat, but it only applies to certain elements. You can use it on html to set the scheme for the entire page, and on some form control elements like input and select.

Browse all notes