Frontend Mentor - Social media dashboard with theme switcher solution

This is a solution to the Social media dashboard with theme switcher challenge on Frontend Mentor. Frontend Mentor challenges help you improve your coding skills by building realistic projects.

Table of contents

Overview

The challenge

Users should be able to:

  • View the optimal layout for the site depending on their device's screen size
  • See hover states for all interactive elements on the page
  • Toggle color theme to their preference

Screenshot

Links

My process

Built with

  • Semantic HTML5 markup
  • CSS custom properties
  • Flexbox
  • CSS Grid
  • Sass/SCSS
  • Gulp
  • JavaScript

What I learned

Below is a sass function which converts px to em.

@use 'sass:math';

@function rem($pixels, $context: 16) {
  @return (math.div($pixels, $context)) * 1rem;
}

Useful resources

  • CSS Tricks - This helped me with creating a sass function that converts px to em for responsiveness.

Author

Acknowledgments

I would like to acknowledge Coder Coder for their YouTube playlist on building this project.