min(), max(), and clamp()
Widely available since 2023-01-28
The min()
and max()
CSS functions return the minimum or maximum of the arguments, while clamp()
clamps a value to a given range.
Learning resources on MDN
Browser support (view on caniuse.com)
- Chrome 79 Released on 2019-12-10
- Chrome Android 79 Released on 2019-12-17
- Edge 79 Released on 2020-01-15
- Firefox 75 Released on 2020-04-07
- Firefox for Android 79 Released on 2020-07-28
- Safari 13.1 Released on 2020-03-24
- Safari on iOS 13.4 Released on 2020-03-24
Surveys
- State of CSS 2024: usage/favorite_new_features question
- State of CSS 2024: features/all_features question
Specifications
View web-platform-tests results for this feature - View the feature source file (dist) - Edit the feature - Report an issue about this feature