Automatic Light Mode ⚡ Dark Mode Switcher for GeneratePress


In this video, I’m going to show you how you can use the “prefers color scheme” CSS media feature to create an automatic light mode / dark mode switch on your GeneratePress website.

Here’s the code you need:

@media (prefers-color-scheme: dark) { /* put your root color declarations here */ }

Add your first comment to this post