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. I appreciate the clarity of this trick that Mikael Ainalem posted over on Reddit. Could be on any element as well!

1m read timeFrom css-tricks.com
Post cover image
3 Comments

Sort: