Css – JS function for Darkmode / Lightmode with value checking via Local Storage gives me a quick color change when going on subpages
I would like to add a button for switching to darkmode and lightmode on my website. I use var()'s in my css to control the color of my elements. This is my code: function loadMode() { const mode = localStorage.getItem('mode');…