This is a solution to the Product preview card component challenge on Frontend Mentor.
Users should be able to:
- View the optimal layout depending on their device's screen size
- See hover and focus states for interactive elements
- Solution URL: https://github.com/sieben-marco/product-preview-card-component
- Live Site URL: https://sieben-marco.github.io/product-preview-card-component
- Semantic HTML5 markup
- CSS custom properties
- Flexbox
- Mobile-first workflow
- Media Queries
- BEM - Block, Element, Modifier
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;
}
}
I want to keep learning about web development and improve my js.
- CSS Units for font-size - This helped me for configure the font-size root.
- O que você precisa saber - This is a post which helped me know BEM. **(Portuguese)
- Utilizando Media Queries - This is an amazing article which helped me finally understand Media Queries. **(Portuguese)
- Frontend Mentor - @sieben-marco
- LinkedIn - Marco Sieben