Responsive Order Summary Component with CSS flexbox
Design comparison
Solution retrospective
I find it difficult to match teh text with exact font-size and font-weight. some how the example given has a thicker font weight, than what I am replicating.
Do any of you face the same problem? It will be greate if you could clarify this for me. Thank you
Community feedback
- @adityaphasuPosted over 1 year ago
Hi there! Good job on completing the challenge! ππ»
The issue with the font weight is that you have only imported the default font from google fonts (i.e the font weight 400), so when you try to apply the
font-weight: 900
to the heading it doesnt really get applied since you dont have that font weight. Unlike the default fonts where we can apply font weights to them without any worries, we have to import the font weights as well for any imported font to use the font weights.In the style guide you can see that they have specified 500,700 and 900 so basically you have to pick the font with those font weights from google fonts. (the font weights in google fonts are specified along with the font at the right hand side.)
π― In your case it'll be:
@import url('https://fonts.googleapis.com/css2family=Red+Hat+Display:wght@500;700;900&display=swap');
- After just this change your font weight properties should work!
Also only the font weights you import with the font will work and not others, so like now if you try
font-weight: 400
it wont work since you have only the font with weights 500,700 and 900.I hope this clarifies your doubt. π
Happy Coding!πΊπ»
Marked as helpful1@vishnu-31Posted over 1 year agoThak you @adityaphasu. I get the idea now. Thanks for the clarification. IT is helpful.
1
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