Typography reference
Minimum and maximum font size
CSS clamp constrains a preferred value between a minimum and maximum. A preferred viewport-relative expression can provide gradual size changes.
Try the visual comparison
The fixed 32px heading is compared with clamp(22px, 4vw, 42px). At 800 CSS px viewport width, 4vw is 32px; at smaller or larger widths the clamp applies its bounds.
Example A
A responsive headline
font-size:32px;Example B
A responsive headline
font-size:clamp(22px, 4vw, 42px);These examples use browser/system fonts unless explicitly noted. Actual rendering and font feature support vary with your environment.
What to check in your project
Use the fluid calculator for exact desired endpoints. Inspect the computed size at both ends and a midpoint, and test long headings and zoom independently.
Explore the related tool or guide →