Dashboard theme switcher using Flex, Grid, JS

Solution retrospective
I'm thinking this solution could be more elegant, maybe using themes in css. I'd appreciate any feedback thank you :-)
Please log in to post a comment
Log in with GitHubCommunity feedback
- @alex-kim-dev
Yeah, the css variables are very helpful for this kind of purpose. The alternative set of color variables could be used with a selector that targets the
checked
state of the switch, eliminating the need to use JS for theme changing.
Join our Discord community
Join thousands of Frontend Mentor community members taking the challenges, sharing resources, helping each other, and chatting about all things front-end!
Join our Discord