@@ -578,6 +578,9 @@ are represented by subclasses of the {{CSSNumericValue}} interface.
578
578
CSSNumericValue mul(CSSNumberish... values);
579
579
CSSNumericValue div(CSSNumberish... values);
580
580
581
+ CSSNumericValue min(CSSNumberish... values);
582
+ CSSNumericValue max(CSSNumberish... values);
583
+
581
584
boolean equals(CSSNumberish... value);
582
585
583
586
CSSNumericValue to(DOMString unit);
@@ -705,6 +708,52 @@ The following are the arithmetic operations you can perform on dimensions:
705
708
is set to |this|.
706
709
</div>
707
710
711
+ <div algorithm="CSSNumericValue.min()">
712
+ The <dfn for=CSSNumericValue method>min(...|values|)</dfn> method,
713
+ when called on a {{CSSNumericValue}} |this|,
714
+ must perform the following steps:
715
+
716
+ 1. Replace each [=list/item=] of |values|
717
+ with the result of [=rectifying a numberish value=] for the [=list/item=] .
718
+
719
+ 2. If |this| is a {{CSSMathMin}} object,
720
+ [=list/prepend=] the [=list/items=] in |this|’s {{CSSMathMin/values}} internal slot
721
+ to |values|.
722
+ Otherwise,
723
+ prepend |this| to |values|.
724
+
725
+ 3. Let |type| be the result of [=adding=] the [=types=] of every [=list/item=] in |values|.
726
+ If |type| is failure,
727
+ [=throw=] a {{TypeError}} .
728
+
729
+ 4. Return a new {{CSSMathMin}} object
730
+ whose {{CSSMathMin/values}} internal slot
731
+ is set to |values|.
732
+ </div>
733
+
734
+ <div algorithm="CSSNumericValue.max()">
735
+ The <dfn for=CSSNumericValue method>max(...|values|)</dfn> method,
736
+ when called on a {{CSSNumericValue}} |this|,
737
+ must perform the following steps:
738
+
739
+ 1. Replace each [=list/item=] of |values|
740
+ with the result of [=rectifying a numberish value=] for the [=list/item=] .
741
+
742
+ 2. If |this| is a {{CSSMathMax}} object,
743
+ [=list/prepend=] the [=list/items=] in |this|’s {{CSSMathMax/values}} internal slot
744
+ to |values|.
745
+ Otherwise,
746
+ prepend |this| to |values|.
747
+
748
+ 3. Let |type| be the result of [=adding=] the [=types=] of every [=list/item=] in |values|.
749
+ If |type| is failure,
750
+ [=throw=] a {{TypeError}} .
751
+
752
+ 4. Return a new {{CSSMathMax}} object
753
+ whose {{CSSMathMax/values}} internal slot
754
+ is set to |values|.
755
+ </div>
756
+
708
757
<div class=issue>
709
758
Define {{CSSNumericValue/equals()}} .
710
759
</div>
0 commit comments