Skip to content

sieben-marco/product-preview-card-component

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Responsive card mobile-first solution | Frontend Mentor

This is a solution to the Product 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
  • See hover and focus states for interactive elements

Screenshot

Desktop Layout

Links

My process

Built with

  • Semantic HTML5 markup
  • CSS custom properties
  • Flexbox
  • Mobile-first workflow
  • Media Queries
  • BEM - Block, Element, Modifier

What I learned

I learned about BEM and Media Queries. I also applied some things that I've learned how layout designs and how to make a web site with mobile-first.

<div class="card">
  <p class="card__price--sale">$149.99</p>
  <p class="card__price--real">$169.99</p>
</div>
@media screen and (min-width: 1200px) {
  .card {
    width: 80rem;
  }
  .card__image,
  .card__wrapper {
    width: 40rem;
  }
  .card__wrapper {
    padding: 4.6rem;
  }
}

Continued development

I want to keep learning about web development and improve my js.

Useful resources

Author

Releases

No releases published

Packages

No packages published