Hello there!
In this project I decided to go without any framework, just the good ol' semantic HTML5, CSS and Vanilla JS (I kind of enjoy doing things without the complexity of a framework).
Although the challenge request the use of prefers-color-scheme
, I solved the "save user selected theme" problem by using only LocalStorage.
Any ideas on how I can improve the code (making it shorter, faster, using the best practices...) is welcome. Feel free to comment! :)
Update: Following suggestion, improved how the ThemeSelector class' changeTheme() method works. Instead of going through the elements array twice, it now runs it only once.