Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found

Submitted

Responsive Product Card using picture+srcset

Kureon 120

@Kureon

Desktop design screenshot for the Product preview card component coding challenge

This is a solution for...

  • HTML
  • CSS
1newbie
View challenge

Design comparison


SolutionDesign

Solution retrospective


  • Learned about picture and srcset attributes.
  • For the button hover state I wasn't able to use the sass darken function in combination with a variable color. Is there a way to do that or is there an other best practice for?
  • For the mobile media query I had to alter all the font sizes. Is there a beter/smarter way to do that?

Community feedback

@ssembatya-dennis

Posted

For the case of font sizes from the desktop view to mobile media screen sizes, I personally recommend setting a root font size and using relatives units like rems for fonts such that for small media screens you just reduce the root font size and all fonts sizes for various elements shrink proportionally. //e.g setting for the desktop version html { font-size: 62.5%; }

Marked as helpful

0

Please log in to post a comment

Log in with GitHub
Discord logo

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