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

Product Preview Card

P

@itsmesrishti

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


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

Completing the project.

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

I found using calc(rem + vw) with clamp challenging. Like what would be the apt value for the calc was a bit tricky to figure out. I just went with instict then and just played around with diff values until i liked the font size on the 320px mobile and 1440px desktop screens.

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

Whether my use of picture element was correct or I should have used srcset. And any help with fluid typography or any other areas of the project.

I would also like help with google fonts. Earlier they used to have a feature where you could download only font weight that you need now it seems like you have to download the whole family even though you might need only 2-3 font weights. How can I choose the specific font weights only?

Community feedback

@denissejoyce

Posted

Hey Srishti, good job on completing the challenge!

To address your last question about the font weights, you're going to have to replace some parts of your base URL — after the font family name, you will have to use wght (axis property for weight) and then use '@' afterward, followed by your preferred font weights (separated by semi-colon) like so ⬇️

(for example you want Fraunces in 400 and 600, and Monsterrat in 300 and 700)

<link
      href="https://fonts.googleapis.com/css2?family=Fraunces:wght@400;600&family=Montserrat:wght@300;700&display=swap"
      rel="stylesheet"
    />

They also explained this and more in their API docs ☺️

1

P

@itsmesrishti

Posted

@denissejoyce Hi, thanks for the explanation. I'll try it out next time and checkout their docs as well! Thanks :)

0

@denissejoyce

Posted

No problem! @itsmesrishti

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