clamp()
The CSS function clamp(min, preferred, max), which uses the preferred value but never goes below min or above max.
In more detail
For fluid typography the preferred value depends on the viewport width, for example 1.25rem + 3vw. The lesson computes it from a slope (how fast size changes per pixel of width) and an intercept.
Related terms
- fluid typography — Font sizes that grow smoothly with the width of the screen between a minimum and a maximum, instead of jumping at breakpoints.
- viewport — The visible area of a web page in the browser window or device screen.
- 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