Skip to content
A test using prefers-color-scheme for Safari Preview
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
README.md
index.html

README.md

safari-theme-css

Testing prefers-color-scheme on Safari Preview

This example uses @media (prefers-color-scheme: dark) { ... } to modify the look of the webpage. You could also use @media (prefers-color-scheme: light) { ... } to target light mode specifically.

Take a look at the Demo As of November 2018, This only works on Safari Technology Preview.

For some more context on what this is checkout my Medium article, Automatic Dark Mode for your website

You can’t perform that action at this time.