A practical guide to creating fluid typographic scales using CSS `clamp()` combined with the experimental `:heading()` pseudo-class. The approach uses a linear ramp formula between minimum and maximum viewport widths, with explicit heading-level mapping via CSS custom properties and `pow()` for exponential scaling. Writing the sizing logic once in a single `:heading` block keeps all calculations in one place, making design system updates trivial. The article also covers WCAG 1.4.4 compliance by using `rem` units for min/max values, and notes that `:heading()` and `pow()` are currently only available in Safari Technology Preview.

3m read timeFrom alwaystwisted.com
Post cover image
Table of contents
The Fluid Typography FormulaImplementing with :heading()Browser Support

Sort: