Skip to content

dboca93/fm__stats__003

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 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. Frontend Mentor challenges help you improve your coding skills by building realistic projects.

Screenshots

Desktop Screenshot

Built with

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

Links

What I learned

In this project I learned about the following cool techniques.

  1. Using a mixture of fixed heights and auto within a grid-template-row context:
grid-template-rows: 21.9375rem auto;
  1. Using a combination of gap, padding and exact fixed widths with a grid context to space out the text exactly how we want. This is crucial on small screen sizes:
  .hero__section article {
    gap: 0.125rem;
    padding: 0.3125rem 1.5625rem;
    grid-template-rows: 6.5625rem 7.1875rem 16.5625rem;
  }
  1. In order to create the change in color we see in the image, I used a background--linear-gradient on the picture element, while using mix-blend-mode: multiply on the img, as seen below:
.hero__section picture {
  grid-area: picture__area;
  background: linear-gradient(180deg, #ff61f3 0, #b86ffb 100%);
}
.hero__section picture img {
  width: 100%;
  height: 100%;
  display: block;
  -o-object-fit: cover;
     object-fit: cover;
  mix-blend-mode: multiply;
}

Author

Dilhan Boca

Frontend Mentor Profile:

Gmail: dboca93@gmail.com

About

Frontend Mentor: Task 003, this is a key task.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published