@felipetn1989Submitted almost 2 years ago
Learned to create a toggle switch for a dark / light theme. Used a template from w3schools and adjusted the parameters for my project. Inside the javaScript, added mouseover and mouseout events for both the dark and light pages. Without them, the dark page parameters would transfer to the light page when using the toggle, so I had to create events for both cases even considering I already had hover states in my CSS. Tried to group similar elements together to save a lot of lines in the JS code.
Feedback is welcome!