I appreciate the clarity of this trick that Mikael Ainalem posted over on Reddit:
It’s a one-liner that toggles the class on the
<body> so you can mock up different states and toggle between them on click.
Could be on any element as well!
classList is perhaps the one API you should know.
The post Body Toggle appeared first on CSS-Tricks. You can support CSS-Tricks by being an MVP Supporter.