With the introduction of dark mode in macOS, Safari Technology Preview 68 has released a new feature called prefers-color-scheme which lets us detect whether the user has dark mode enabled with a media query.

As a site based around Apple products, I think it would be pretty cool to support dark mode CSS media queries. Safari is the first major browser to support this and I think other browsers are likely to follow.

I would also suggest adding a toggle in Settings as many people use Chrome who doesn't currently support this.

Below is the media query:

@media (prefers-color-scheme: dark) {

  • 2
    The "dark theme" in general has been suggested since 2011 though...
    – Andrew T.
    Commented Mar 20, 2019 at 13:19
  • @AndrewT. Oh... Commented Mar 20, 2019 at 13:26
  • 1
    Sounds like it’s about time!
    – dwightk
    Commented Mar 21, 2019 at 11:55
  • I’m reading the site on my iPad in a darkened room and it’s blinding. Yes, please, Dark Mode!
    – TJ Luoma
    Commented Oct 27, 2019 at 1:09


You must log in to answer this question.

Browse other questions tagged .