fluid typography

Font sizes that grow smoothly with the width of the screen between a minimum and a maximum, instead of jumping at breakpoints.

In more detail

It is written with CSS clamp() and a middle value that mixes rem and viewport width units. The size is fixed below a minimum screen width, fixed above a maximum, and slides linearly in between.

Example

clamp(2rem, 1.25rem + 3vw, 3.5rem) grows a heading from 32px at a 400px-wide viewport to 56px at 1200px.

Related terms

Taught in

References