loading...

re: Create A Dark/Light Mode Switch with CSS Variables VIEW POST

FULL DISCUSSION
 

Just added mine over at felixparadis.com :)

Quick note about accessibility though:
If you just display:none; your input, you're making it unaccessible through keyboard navigation.
Just hide it behind the label instead and everyone can toggle 🎉
Then add aria-label="Switch visual theme" to your input and blind users can know what's it about.

Code of Conduct Report abuse