clamp()
A CSS function that takes three values — minimum, preferred, and maximum — and keeps the result within the range. clamp(1rem, 2.5vw, 2rem) gives a value that scales with the viewport but never goes below 1rem or above 2rem. The basis for "fluid" responsive design.
Mechanic: clamp(MIN, PREFERRED, MAX) = max(MIN, min(PREFERRED, MAX)). The preferred value is often viewport-relative (vw) so it scales smoothly with the screen size, while min/max set reasonable bounds. Classic use case: fluid typography — headings that grow smoothly with the screen instead of jumping at media-query breakpoints (font-size: clamp(1.5rem, 4vw, 3rem)). Also for spacing, widths, padding. Win: a single line replaces several media queries and gives a continuously adapted layout. Often combined with custom properties and calc() for advanced formulas. Together with min() and max() part of CSS's math functions. A modern fundamental technique for responsive design. Related to CSS custom properties and container queries.