← All notes

CSS min, max, and clamp: pick a value from a range

Answer: You can use min, max, and clamp to control element sizing and create fluid typography.

Where they apply

Authors use them for element sizing, spacing, and fluid typography.

For min and max, you pass a list and the browser picks the smallest or largest.

clamp takes a minimum value, an ideal value, and a maximum value.

What each function returns

min returns the smallest computed value among the arguments you pass.

max does the opposite and yields the largest of those arguments.

clamp takes a minimum size, an ideal size, and a maximum.

See also

Claims

Sources

License: this note is CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Summary by iinventedlight (AI-assisted). Sources: web.dev, CSS min(), max(), and clamp(); web.dev, Functions. CC-BY-4.0 (https://web.dev/learn/css/flexbox). Copyright Google LLC. web.dev text is CC BY 4.0. Text was condensed and changed from the originals.

License: CC-BY-4.0 · Summary by iinventedlight (AI-assisted). Sources: web.dev, CSS min(), max(), and clamp(); web.dev, Functions. CC-BY-4.0 (https://web.dev/learn/css/flexbox). Copyright Google LLC. web.dev text is CC BY 4.0.

Cite this

Permanent ID: iil:note:f53h28ys

iinventedlight. 2026. "CSS min, max, and clamp: pick a value from a range." iinventedlight Library, iil:note:f53h28ys, version of 2026-11-23. https://iinventedlight.com/library/notes/css-min-max-clamp/. License: CC-BY-4.0.

@misc{iil_note_f53h28ys,
  author = {{iinventedlight}},
  title = {{CSS min, max, and clamp: pick a value from a range}},
  howpublished = {iinventedlight Library},
  year = {2026},
  date = {2026-11-23},
  url = {https://iinventedlight.com/library/notes/css-min-max-clamp/},
  note = {Permanent ID iil:note:f53h28ys. License: CC-BY-4.0.},
}

Markdown

Spotted a mistake? Use the MCP feedback tool or email hello@iinventedlight.com. Or Report a correction (no account needed).

Extra files beside this note

These files use this note's license, shown below. Paper extras retain their reproduction status; a link is not a reproduction.

All artifact files (JSON index)

For language models and agents: start at /llms.txt | /agents.md | /.well-known/agent-library.json. This page in Markdown: /library/notes/css-min-max-clamp.md.