Frontend Mentor - Stats preview card component solution

This is a solution to the Stats preview card component challenge on Frontend Mentor. Frontend Mentor challenges help you improve your coding skills by building realistic projects.

Overview

The challenge

Users should be able to:

  • View the optimal layout depending on their device's screen size

Screenshot

Links

My process

Built with

  • Semantic HTML5 markup
  • CSS custom properties
  • Flexbox
  • CSS Grid
  • Mobile-first workflow

Design

Front-end Style Guide

Layout

The designs were created to the following widths:

  • Mobile: 375px
  • Desktop: 1440px

Colors

Primary

  • Very dark blue (main background): hsl(233, 47%, 7%)
  • Dark desaturated blue (card background): hsl(244, 38%, 16%)
  • Soft violet (accent): hsl(277, 64%, 61%)

Neutral

  • White (main heading, stats): hsl(0, 0%, 100%)
  • Slightly transparent white (main paragraph): hsla(0, 0%, 100%, 0.75)
  • Slightly transparent white (stat headings): hsla(0, 0%, 100%, 0.6)

Typography

Body Copy

  • Font size: 15px

Font

Author