Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found

Submitted

Social Media Dashboard | SCSS & Vanilla JS with Local Storage

@krisp-dev

Desktop design screenshot for the Social media dashboard with theme switcher coding challenge

This is a solution for...

  • HTML
  • CSS
  • JS
2junior
View challenge

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 GitHub
Discord logo

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