Skip to content
  • Unlock Pro
  • Log in with GitHub
Solution
Submitted about 1 year ago

Product Preview Card using vanilla CSS

Aurélien F.•80
@aurelienflieger
A solution to the Product preview card component challenge
View live sitePreview (opens in new tab)View codeCode (opens in new tab)

Solution retrospective


What are you most proud of, and what would you do differently next time?

I successfully implemented the cart icon using the ::before pseudo-element in CSS - no HTML needed, since this is only a decorative icon, the screen readers do not need to see it.

What challenges did you encounter, and how did you overcome them?

I was not sure whether to use clamp() or the traditional min-width & max-width for the width.

I experimented with clamp but did not find the results controlled enough. It provided a janky interface. I need to experiment more.

What specific areas of your project would you like help with?

/

Code
Loading...

Please log in to post a comment

Log in with GitHub

Community feedback

No feedback yet. Be the first to give feedback on Aurélien F.'s solution.

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

Stay up to datewith new challenges, featured solutions, selected articles, and our latest news

Frontend Mentor

  • Unlock Pro
  • Contact us
  • FAQs
  • Become a partner
  • Use cases

Explore

  • Learning paths
  • Challenges
  • Solutions
  • Articles

Community

  • Discord
  • Guidelines

For companies

  • Hire developers
  • Train developers
© Frontend Mentor 2019 - 2025
  • Terms
  • Cookie Policy
  • Privacy Policy
  • License