In macOS Mojave, you can set your preference to dark UI. You can target this preference with CSS using code like this: @media (prefers-color-scheme: light) { body { background-color: #FFF; color: #000; } } @media (prefers-color-scheme: dark) { body { background: #000; color: #FFF; } } See this Codepen for a demo. This only works […]
Make a website dark according to user preferences
- Posted in web