Fluid Type Scale Generator With clamp()

Create font sizes that adapt smoothly between phones and desktops without breakpoints: set the smallest and largest sizes and the scale ratio, and get CSS variables for every heading and text with a live preview.

Create the scale
Hyyatstep 5Hyyatstep 3Hyyatstep 1Hyyatstep 0clamp(1rem, .95rem + .22vw, 1.13rem)

Generator

Why clamp() instead of breakpoints?

The old way sets one size for mobile and another for desktop, so text jumps at a certain width. With clamp() text grows gradually with the screen, never below the minimum or above the maximum.

clamp()clamp(MIN, PREFERRED, MAX)
Examplefont-size: clamp(1rem, 0.95rem + 0.22vw, 1.125rem);
Usageh1 { font-size: var(--step-5); }
rem1rem = 16px

Tips for Arabic type

A smaller ratio

Arabic needs taller line height, so 1.2 to 1.25 suits better than 1.333.

Body at least 16

Smaller strains reading on phones.

Pick the font first

Try fonts in the Arabic font preview.

Example: headings that do not break on phones

A 48 px heading looks great on desktop but wraps into many lines on a phone. With a fluid scale the heading starts smaller on phones and grows gradually, so you set var(--step-5) once and forget breakpoints.

Key terms

Short definitions of what you meet along the way.

clamp()
A CSS function giving a value between a minimum and maximum that changes with screen width.
Scale ratio
The number each size is multiplied by to get the next one up.
rem
A unit equal to the root font size, usually 16 pixels.

Frequently asked questions

Did not find your answer? Ask us on WhatsApp

Why rem units?

They respect the visitor's browser font size, which matters for accessibility.

Does it work in Elementor?

Yes. Put the variables in Site Custom CSS, then use var(--step-3) in fields that accept CSS.

Is it supported?

Yes, clamp() works in all modern browsers.

Want a fast, beautiful WordPress site?

We design Arabic WordPress themes that are easy to edit.

Contact us on WhatsApp