battling with font sizes, a rather messy solution for the card preview
Design comparison
Solution retrospective
It was hard to make texts scale down with the flexbox. When flexbox shrank, the box of the text elements would shrink aswell, however the text inside would not. They continued to have the same font size, and this would make the contents of the flexbox overflow. I tried using vw's, em's, rem's and in the end I settled with using cqi font sizes.
I also attempted to use @container to make the font sizes change with the container's width or height. However @container required container-type: inline-size to be used (if you want to check width), and that would break the whole projects font sizes, so I had to find a new solution.
Community feedback
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