Modern Responsive Design Features
Learn CSS math functions to optimize responsive design by dynamically adjusting sizes and container queries.
We'll cover the following...
The CSS math functions min()
, max()
, and clamp()
became stable in April 2020. These functions accept multiple values, which makes them excellent companions for dynamically changing numeric values wherever numbers are accepted. This includes dimension properties as well as gradients, background-size
, box-shadow
, font-size
, and more.
Here’s what they do:
min()
: This asks the browser to use the smaller computed size.max()
: This asks the browser to use the larger computed size....