Skip to content
  • Unlock Pro
  • Log in with GitHub
Solution
Submitted almost 3 years ago

social-media-dashboard with theme switcher

accessibility, bem, gulp, sass/scss, parcel
Emmanuel Daniel•1,170
@coderdannie
A solution to the Social media dashboard with theme switcher challenge
View live sitePreview (opens in new tab)View codeCode (opens in new tab)

Solution retrospective


My greatest challenge while building this project is building the toggle switcher. This is my first time building such and I am happy I was able to achieve this. Concerning best practices, I used ': has' CSS selector on the ':root' element to implement switching between the themes(dark and light) via javascript rather than the prefer-color-scheme CSS feature. Although the approach I used is not supported by all browsers I managed to give it all browsers support using javascript and it worked perfectly fine. I am not sure whether this approach conforms to the best practices. I will appreciate your comment as regards this. Thanks

Code
Loading...

Please log in to post a comment

Log in with GitHub

Community feedback

No feedback yet. Be the first to give feedback on Emmanuel Daniel's solution.

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

Stay up to datewith new challenges, featured solutions, selected articles, and our latest news

Frontend Mentor

  • Unlock Pro
  • Contact us
  • FAQs
  • Become a partner
  • Use cases

Explore

  • Learning paths
  • Challenges
  • Solutions
  • Articles

Community

  • Discord
  • Guidelines

For companies

  • Hire developers
  • Train developers
© Frontend Mentor 2019 - 2025
  • Terms
  • Cookie Policy
  • Privacy Policy
  • License