Fluid type with clamp(): do you scale body text too, or only headings?
I've been using CSS clamp() to make headings scale smoothly between mobile and desktop, and it's lovely. Now I'm wondering whether body text should do the same.
Arguments for: a slightly larger body size on big screens reads better. Arguments against: body text should stay predictable, and users who zoom need it to respond properly, so the preferred value should include a rem component rather than pure viewport units.
What's your setup? Fixed body with fluid headings, or everything fluid?
Comments · 3
Body text can use a gentler clamp, like 16 to 18px, so it doesn't feel jumpy. Headings can scale more because they have more room to breathe.
Keep the minimum readable. If your clamp ends up smaller than 16px on phones, text becomes tiring to read. Test on actual devices.
Is there a risk with users who zoom text? I've heard clamp with viewport units can interfere with accessibility zoom.