
Product Preview Card Component–Responsive Design with Clamp and Media
Design comparison
Solution retrospective
I'm proud of successfully using clamp(), media queries, and the <picture> element to create a fully responsive design. This was my first time applying clamp() extensively, and it helped make the layout more fluid across different screen sizes.
Next time, I’d add an extra media query for larger screens to improve scaling on bigger monitors. I’d also refine my use of clamp() to ensure smoother transitions across different resolutions.
What challenges did you encounter, and how did you overcome them?One of the biggest challenges was getting the design to look consistent across different screen sizes, especially between my laptop and external monitor. Since they have different resolutions, the layout didn’t always match the expected design.
To overcome this, I used clamp() for more flexible typography and spacing, ensuring smoother scaling. I also adjusted media queries to fine-tune the layout for both mobile and desktop. However, I realized I might need an additional media query for larger screens to further improve responsiveness.
What specific areas of your project would you like help with?-
Optimizing clamp() values – Are my scaling choices ideal for smooth responsiveness across different screen sizes?
-
Improving large-screen layouts – Should I add another media query for better scaling on bigger monitors?
-
Best practices for <picture> – Is this the most efficient way to swap images for different screen sizes?
Community feedback
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