diff --git a/files/en-us/web/css/max()/index.html b/files/en-us/web/css/max()/index.html index cf616e7af05aad5..9753994efeb706a 100644 --- a/files/en-us/web/css/max()/index.html +++ b/files/en-us/web/css/max()/index.html @@ -25,7 +25,7 @@
The max()
function takes one or more comma-separated expressions as its parameter, with the largest (most positive) expression value used as the value of the property to which it is assigned.
The expressions can be math expressions (using arithmetic operators), literal values, or other expressions, such as {{CSSxRef("attr", "attr()")}}, that evaluate to a valid argument type (like {{CSSxRef("<length>")}}), or nested {{CSSxRef("min", "min()")}} and max()
functions.
The expressions can be math expressions (using arithmetic operators), literal values, or other expressions, such as {{CSSxRef("attr()", "attr()")}}, that evaluate to a valid argument type (like {{CSSxRef("<length>")}}), or nested {{CSSxRef("min()", "min()")}} and max()
functions.
You can use different units for each value in your expression. You may also use parentheses to establish computation order when needed.
@@ -70,7 +70,7 @@When max()
is used for controlling text size, make sure the text is always large enough to read. A suggestion is to use the {{CSSxRef("min", "min()")}} function nested within a max()
that has as its second value a relative length unit that is always large enough to read. For example:
When max()
is used for controlling text size, make sure the text is always large enough to read. A suggestion is to use the {{CSSxRef("min()", "min()")}} function nested within a max()
that has as its second value a relative length unit that is always large enough to read. For example:
small { font-size: max(min(0.5vw, 0.5em), 1rem); @@ -79,7 +79,7 @@Accessibility concerns
This ensures a minimum size of 1rem, with a text size that scales if the page is zoomed.