Skip to content
My Blog

Search WPDesignVault

Try "image", "json", "schema" or "contrast". Use arrow keys to move through results.

CSS Tools

CSS Clamp Generator (Fluid Typography)

Generate a CSS clamp() value that grows smoothly from a minimum size on small screens to a maximum on large screens. Ideal for fluid typography and spacing, including in Elementor.

Runs in your browser. Nothing you enter is uploaded. Last updated

Fluid text scales smoothly

ViewportComputed size

How to use

  1. Enter the smallest and largest size you want, in pixels.
  2. Enter the viewport widths where scaling should start and stop.
  3. Drag the preview slider to check the size at different widths, then copy the CSS.

What this tool does

It solves the straight line between your two points: slope = (max size − min size) ÷ (max width − min width), then writes clamp(min, intercept + slope × 100vw, max) using rem units so the value respects the user’s browser font size.

Why it matters

Fluid values remove the need for many breakpoint-specific font sizes, and keep headings in proportion on every screen.

Example

From 18 px at 360 px wide to 24 px at 1280 px wide gives font-size: clamp(1.125rem, 0.9783rem + 0.6522vw, 1.5rem);

Tips

  • Keep the maximum no more than about 2.5 times the minimum so text still zooms properly (WCAG 1.4.4).
  • In Elementor, paste the clamp() value into a typography size field set to the custom unit.

Frequently asked questions

Why rem instead of px?

rem values scale with the visitor's browser font-size setting, which keeps text accessible.

Is clamp() supported everywhere?

Yes, in all current major browsers.

Type Scale Generator

Build a harmonious typographic scale from a base size and ratio, preview it, and export CSS variables. Switch…

PX to REM Converter

Convert pixels to rem instantly with any base font size, see a reference table, or convert every px…

REM to PX Converter

Convert rem values to pixels for any root font size, with a quick reference table.

CSS Gradient Generator

Build linear, radial and conic CSS gradients visually with multiple colour stops and copy production-ready code.

CSS Minifier

Minify CSS by removing comments and unnecessary whitespace, and see exactly how many bytes you save.

CSS Box Shadow Generator

Design soft, natural box shadows with up to four layers and a live preview, then copy the CSS.