@@ -2888,6 +2888,12 @@ Comparison Functions: ''min()'', ''max()'', and ''clamp()''</h3>
2888
2888
(That is, given ''clamp(MIN, VAL, MAX)'' ,
2889
2889
it represents exactly the same value as ''max(MIN, min(VAL, MAX))'' ).
2890
2890
2891
+ For all three functions,
2892
+ the argument [=calculations=] can resolve to any <<number>> , <<dimension>> , or <<percentage>> ,
2893
+ but must have the <em> same</em> [=determine the type of a calculation|type=] ,
2894
+ or else the function is invalid;
2895
+ the result will have the same [=CSSNumericValue/type=] as the arguments.
2896
+
2891
2897
<div class="example">
2892
2898
2893
2899
''min()'' , ''max()'' , and ''clamp()'' can be used to make sure a value doesn't exceed a "safe" limit:
@@ -3916,7 +3922,8 @@ Type Checking</h3>
3916
3922
3917
3923
* The [=CSSNumericValue/type=] of a ''calc()'' or ''abs()'' expression
3918
3924
is the [=CSSNumericValue/type=] of its contained [=calculation=] .
3919
- * The [=CSSNumericValue/type=] of a ''min()'' , ''max()'' , or ''clamp()'' expression
3925
+ * The [=CSSNumericValue/type=] of a
3926
+ ''min()'' , ''max()'' , ''clamp()'' , ''hypot()'' , ''round()'' , ''mod()'' , or ''rem()'' expression
3920
3927
is the result of [=add two types|adding the types=]
3921
3928
of its comma-separated [=calculations=] .
3922
3929
* The [=CSSNumericValue/type=] of a ''sign()'' expression
@@ -3927,9 +3934,6 @@ Type Checking</h3>
3927
3934
is «[ "angle" → 1 ] ».
3928
3935
* The [=CSSNumericValue/type=] of a ''pow()'' , ''sqrt()'' , ''log()'' , or ''exp()'' expression
3929
3936
is «[ "number" → 1 ] ».
3930
- * The [=CSSNumericValue/type=] of a ''hypot()'' , ''round()'' , ''mod()'' , or ''rem()'' expression
3931
- is the result of [=add two types|adding the types=]
3932
- of its comma-separated [=calculations=] .
3933
3937
3934
3938
For each of the above,
3935
3939
if the [=CSSNumericValue/type=] is failure,
0 commit comments