Four Cards Section With Flexbox

Solution retrospective
Any comments or suggestions are welcome! :)
Please log in to post a comment
Log in with GitHubCommunity feedback
- @LeshyNL
Hi,
Good job on the challenge. It works well, is fully responsive and looks fine at all sizes.
One bit of feedback that I could give is that basing the font size solely on the viewport width can lead to some accessibility and usability issues for very narrow and larger layouts; indeed, at larger widths before the breakpoint in your solution, the header and intro text become rather large.
You can solve this by setting media queries for a minimum and maximum font size at certain widths, or set the font size to be something like 1rem + 0.5vw, so that it does scale with window size, but cannot go below a certain size (and then set a media query for a maximum size).
There is also a new clamp() function that allows you to set minimum and maximum values, but support for mobile browsers seems to still be a bit lacking.
See https://css-tricks.com/how-do-you-do-max-font-size-in-css/ for more info.
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