Skip to content

kens-visuals/stats-preview

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Frontend Mentor - Stats Preview Card Component Solution

This is a solution to the Stats Preview Card Component Challenge on Frontend Mentor.

Table of contents

Overview

The challenge

Users should be able to:

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

Screenshot

screenshot

Links

My process

Built with

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

What I learned

.card__gradient-overlay {
  position: relative;

  &::after {
    content: '';
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    background-color: $color-primary--light;
    mix-blend-mode: multiply;
    opacity: 0.9;
  }
}

.card__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

Useful resources

  • impressivewebs - This website helped me to get some idea of how to add a color overlay on an image.
  • mix-blend-mode - This CSS property helped me to achieve the desirable result of getting as close to the original design as possible.

Author