Dark mode for your website with just CSS

Featured Image

Your website can also get a dark mode when the visitor’s browser has dark mode enabled with some CSS:

@media (prefers-color-scheme: dark) {
  body {
    background-color: black;
    color: #ccc;
  }
}

Enjoy!