DEV Community

Cover image for Global Dark-Mode Switch (JS & Query)

Global Dark-Mode Switch (JS & Query)

mohnishlandge profile image Mohnish Landge ・1 min read

Simple dark-mode switch using filter: invert(1); will cause body DOM problems down the line.
Alt Text

Better use this method to point HTML as css class either using JQuery or ES6.
Alt Text

Mohnish Landge
Hope you find it Useful-
First, learn the code you'll actually use in your projects.

Discussion (0)

Editor guide