DEV Community

loading...
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
https://github.com/mohnishlandge
Hope you find it Useful-
First, learn the code you'll actually use in your projects.

Discussion (0)

pic
Editor guide