
Design comparison
Solution retrospective
I'm using clamp for the font size and set hover style for h1 when its div parent hovers. I tried to pixel-perfect the design, so I used box-shadow in the after pseudo-element to create the 1 px border so the total width of the card could be 522px and the padding is 24px just like the design
What challenges did you encounter, and how did you overcome them?I didn't know what is the right vw value for the font-size. So I just pull up my calculator and calculate if the screen 375px the font is 14px, so it is roughly 3% then I use it as clamp value clamp(14px, 3vw, 16px). It works well.
What specific areas of your project would you like help with?What's the best approach to achieve responsive font size?
Community feedback
- @JinchuanWuPosted 18 days ago
It's a really good solution for the sizing; It inspired me. Everything works well. But The box-shadow should not change when you hover over it
Marked as helpful0
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