Submitted almost 3 years ago
Social Media Dashboard | SCSS & Vanilla JS with Local Storage
@krisp-dev
Design comparison
SolutionDesign
Solution retrospective
I have added a feature where your theme preference gets saved to the Local Storage
where the theme stays dark upon page refresh. However, I couldn't quite get how to complete the following requirement of the challenge "Toggle color theme to their preference".
Wasn't sure whether to use a prefers-color-scheme
media query on the variables decaled in body.dark
or check for it in the JavaScript.
Would appreciate any insight or tips on how to check for the systems color scheme preference and apply it to my code.
Community feedback
Please log in to post a comment
Log in with GitHubJoin 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