FiFont
← All guides

Web design

Build a fluid heading scale

Interpolate a heading between two defined viewport widths.

1. Define endpoints

For example, choose 28px at 360px and 48px at 1200px. Test actual headlines at both widths.

2. Calculate clamp

Enter endpoints in Fluid type. Confirm the minimum, maximum and preferred values are correctly ordered.

3. Test middle widths

Preview the computed size at a width between both endpoints. Confirm the value stops growing beyond the maximum.

4. Review long titles

Try translated headings and larger browser text settings. A size clamp cannot solve every overflow.

Calculate a 28-to-48px heading

Enter a minimum size of 28 at 360px and a maximum of 48 at 1200px. At 780px, halfway between the endpoints, linear interpolation yields 38px. The calculated clamp should stop changing below 360px and above 1200px. Apply it to a real heading and inspect the computed font size at all three widths.

Common pitfall

The calculation interpolates font size, not layout width or text length. Long titles, browser zoom and translation still need a wrapping and accessibility test.

Calculate fluid CSS →

Continue learning

Typography reference with visual examples →