Skip to main content

Harshal V. LADHE

The CSS min() and max() Functions

Using `min()` and `max()` to let the browser choose the smaller or larger of several values at render time.

Content tagged min-max

  • Tutorial:min(), max(), and clamp() — CSS's Value-Bounding Functions

    Three comparison functions that pick a value from a rule, without a single media query.
    min(), max(), and clamp() pick the smallest, largest, or a bounded value from a list of CSS expressions at the point of use, replacing media-query-driven overrides for readable measures, safe-area-aware insets, and bounded widths with one declaration each.
    Published at:
    Categories:CSS
    Estimated reading time:4 min read