clamp() Function

clamp() is a new CSS function that is used to clamp a dimension between two values. 🗜️

It can be considered as a shorthand for the following:

min(a, max(b, c)

🚀 With the syntax clamp(min, x, max), the function returns:

– x is it is between min and max
– min if x is less than min
– max if x is greater than max

This is useful for creating responsive items which you want to restrict within particular dimensions.

#css
#html
#frontend
#webdesign
#fullstack
#webdevelopment
#coding
#programming
#javascript
Post by @baby_wolf_codes

You May Also Like