• min(), max(), and clamp(): three logical CSS functions to use today

    Posted By:            Administrator VRTUZ

    Posted Date:        10/31/2020

    Category:             

With responsive design evolving and becoming increasingly nuanced, CSS itself is constantly evolving and providing authors increased control. The min()max(), and clamp() functions, now supported in all modern browsers, are among the latest tools in making authoring websites and apps more dynamic and responsive.

When it comes to flexible and fluid typography, controlled element resizing, and maintaining proper spacing, min()max(), and clamp() can help.

Background 

The math functions, calc()min()max(), and clamp() allow mathematical expressions with addition (+), subtraction (-), multiplication (*), and division (/) to be used as component values

CSS Values And Units Level 4

Safari was the first to ship the complete set of functions in April 2019, with Chromium following later that year in version 79. This year, with Firefox 75 shipping, we now have browser parity for min()max(), and clamp() in all evergreen browsers.