Responsive Product Card with Scss
Design comparison
Solution retrospective
Not necessarily something to be proud of, but I decided to utilize this challenge as an opportunity to try out the icon library from Lucide as well as the `` element which I am ashamed I have never used before. I knew it existed but I always forget about it, so this was a really nice reminder to integrate more in my projects.
What challenges did you encounter, and how did you overcome them?I was having some issues with the image not taking the full vertical space, but I remembered that when you are using flexbox you can utilize the align-self: stretch
to let the element stretch to fit the whole container.
No feedback in specific, but I would be interested on know how other people decided to handle the structuring and resizing. Maybe pure Flexbox
or Grid
without media queries?
Any feedback or ideas are always welcome. :D
Community feedback
- @huyphan2210Posted 22 days ago
Hi, @SergioCasCeb
I checked out your solution and have some thoughts to share:
I'm a bit unclear about what you meant by "structuring" and "resizing." If you’re referring to responsive development, here are some questions I typically consider:
- Flexbox or Grid? Which one feels more intuitive and maintainable for the layout? Is there an alternative that would be better?
- Media Queries: Does the site actually need them? For simpler layouts, it might be possible to achieve responsiveness by optimizing and combining CSS properties like
min-height
,max-width
, and relative units (rem
,em
,%
), along with functions likeclamp()
,calc()
,min()
, andmax()
. - Handling Additional Content: How well does the code handle more content or data? Will the layout adapt smoothly as the page grows?
- Writing Efficient Code: What’s the minimum amount of code required to maintain the layout across various screen sizes?
Consider these questions and choose the approach that works best for this project. Each project and new learning will bring a unique set of requirements and solutions.
Hope this helps!
Marked as helpful0
Please log in to post a comment
Log in with GitHubJoin 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