Toggling dark/light theme in html

29 Views Asked by At

How can i add a theme toggle function to my html/css website so it changes the theme to dark and light/white in a button? I understand there's a bit of .js involved...

I got a code from CSS-Tricks and just coppied it, of course. But, I fail to make some of the text font colors change along with the rest of the fonts in the html. Can anyone assist because I even tried calling out the text classes themselves in the css query but it doesn't work.

0

There are 0 best solutions below