✨ New on the blog: Better fluid sizing with round()
A look at how round() works and why using it with clamp() is helpful.
Hey everyone,
I just published a new article on using CSS round() to get better fluid sizing, and why it's a nice upgrade to your usual clamp() setup.
If you ever set up fluid typography with clamp() and then noticed the computed font sizes coming out like 17.43px, this one is for you. The round() function lets you snap those values to an interval you choose (like 2px, for example), so your sizes stay predictable as the viewport changes.
It pairs nicely with clamp(), and works for sizing, typography, spacing, and more.
Want to read the full issue? Subscribe for free.