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
- clamp() — The CSS function clamp(min, preferred, max), which uses the preferred value but never goes below min or above max.
- viewport — The visible area of a web page in the browser window or device screen.
- responsive breakpoint — A screen width at which a layout or font size changes, set with a CSS media query.
- rem — A CSS length unit equal to the font size of the root html element, which is 16 pixels unless the user or page changes it.
Taught in
- Typography & Spatial Grids: Modular Scales & Fluid Typography — Design Systems & Component Engineering