← Back to release summary

CSS min(), max() and clamp()

Category
CSS
Type
New or changed feature
Status
Enabled by default (Chrome 79)
Intent stage
Evaluate readiness to ship

WPT details: https://crbug.com/978682

Summary

Adds the comparison functions min(), max(), and clamp() to math expressions for numeric CSS values.

Motivation

The feature has been requested for over a year with many stars, and has been shipped in Safari. We should also make it available in Chromium.

Standards & signals

Ecosystem

Docs: http://bit.ly/31Yfkm6

Explainers: https://developer.mozilla.org/en-US/docs/Web/CSS/min#Examples https://developer.mozilla.org/en-US/docs/Web/CSS/max#Examples https://developer.mozilla.org/en-US/docs/Web/CSS/clamp#Examples

View on chromestatus.com