This is a solution to the Product preview card component challenge on Frontend Mentor. Frontend Mentor challenges help you improve your coding skills by building realistic projects.
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: product-card
- Live Site URL: product-card
- HTML5
- CSS
- Flexbox
I had the opportunity to implement my knowledge of html, css and flexbox, in such a way that it can greatly improve my skills in these tools.
/* MEDIA QUERIES */
@media (min-width: [width]) and (max-width: [width]) {
/* ... */
}
/* VARIABLES */
:root {
--dark-cyan: hsl(158, 36%, 37%);
}
/* FILTERS */
.card__image--perfume {
filter: brightness(80%);
filter: saturate(100%);
}
/* USE VARIABLES */
.card__description--details {
color: var(--dark-grayish-blue);
}
/* EXPAND AN IMAGE */
.card__image--perfume {
object-fit: cover;
}
- Website - product-card
- Frontend Mentor - @fdippiton
- Twitter - @f_dippiton