Can a website running in Safari detect Dark Mode?

I love the Dark Mode feature of macOS Mojave. Some of my apps have already updated with their dark mode interfaces.

I was wondering if there was some way for a website to detect whether Safari or macOS is running in Dark Mode so I can provide an alternate stylesheet to make the website reflect the chosen mode?

It looks like there’s some talk about this, but nothing publicly/nightly available:

Here’s a stackoverflow with more information:

1 Like

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.