Fluid typography · Responsive spacing · Zero media queries
Drag the sliders to set min, preferred, and max. See the zone graph update — blue is where min applies, green is where the fluid preferred value is active, red is where max takes over.
The browser uses whichever value is smaller. Equivalent to clamp(none, a, b).
The browser uses whichever value is larger. Equivalent to clamp(a, b, none).
Equivalent to max(MIN, min(VAL, MAX)). Combines both min and max in one declaration.
vw (like 4vw) creates sizes that can be extreme at edge viewports.
Adding a rem offset like 0.5rem + 2vw controls the slope better:
the rem sets the base, the vw controls how fast it scales.
See the Typography Calculator tab for the exact formula.
Enter your desired font size at two viewport widths. The calculator derives the exact clamp() formula that interpolates perfectly between them — no guessing the vw value.
2.5vw term controls the scaling rate.
Body text stays at a comfortable reading size. Resize the browser to see the heading scale smoothly.
clamp() for font-size, the maximum value must be at least 2× the minimum value (e.g. clamp(1rem, ..., 2rem)).
This ensures the text can still grow 200% when the user activates browser zoom (WCAG 1.4.4 Resize Text — Level AA).
If max is only 1.2× min, zooming to 200% may be prevented.
Resize your browser window to see all of these adapting continuously — no breakpoints, no JavaScript.
All headings scale proportionally without a single media query. The rem + vw pattern gives a gentler slope than bare vw.
ch is the width of the "0" character. 45–75 characters per line is the optimal readability range from typography research.
Every property — padding, font size, border radius, button size — uses clamp(). Resize the browser and watch the whole card scale proportionally.
Apply clamp() to every spatial property for a fully fluid component — no breakpoints anywhere.
Never exceeds 860px on wide screens. Never drops below 200px on narrow ones. The gutters (5vw) grow with the viewport without ever being too tight or too wide.
Border radius and shadow depth scale with viewport — cards feel proportional on any screen size. Tiny radii on mobile; generous, app-like radii on desktop.
Combine with CSS custom properties for a design token system where all spacing automatically scales with the viewport — one definition, universal fluidity.
clamp(400px, 50%, 200px) — the 200px max is ignored because min (400px) > max (200px).
Always ensure min < max.