Submitted 8 months ago
Product preview card using CSS Flex and Grid
@Antonvasilache
Design comparison
SolutionDesign
Solution retrospective
What are you most proud of, and what would you do differently next time?
- Use of grid to create the layout, which lead to writing less code
- Using
linear-gradient
to create the active state, based on the green color from the style guide - Would pay more attention to centering the content, to avoid reworks
- Replacing the image on breakpoint, for mobile devices - couldn't make use of the `` tag, so I added both images into the html tree and toggled the
display: none
property as needed. - Not having a darker shade of green in the style guide, for the active state - I used a linear gradient to achieve the effect:
.content-btn:active,
.content-btn:hover,
.content-btn:focus {
cursor: pointer;
background-image: linear-gradient(
to bottom,
hsl(158, 36%, 37%) 0%,
hsl(158, 36%, 17%) 0%
);
}
What specific areas of your project would you like help with?
Not sure what else I need here. Maybe a more efficient way of replacing images on breakpoints.
Join our Discord community
Join thousands of Frontend Mentor community members taking the challenges, sharing resources, helping each other, and chatting about all things front-end!
Join our Discord