@@ -717,7 +717,7 @@ The following are the arithmetic operations you can perform on dimensions:
717
717
with the same {{CSSUnitValue/unit}} internal slot as |this|,
718
718
and a {{CSSUnitValue/value}} internal slot set to the negation of |this|’s.
719
719
720
- 2 . Otherwise,
720
+ 3 . Otherwise,
721
721
return a new {{CSSMathNegate}} object
722
722
whose {{CSSMathNegate/value}} internal slot
723
723
is set to |this|.
@@ -737,11 +737,28 @@ The following are the arithmetic operations you can perform on dimensions:
737
737
Otherwise,
738
738
prepend |this| to |values|.
739
739
740
- 3. Let |type| be the result of [=multiplying=] the [=types=] of every [=list/item=] in |values|.
740
+ 3. If all of the [=list/items=] in |values| are {{CSSUnitValue}} s
741
+ with {{CSSUnitValue/unit}} internal slot set to "number",
742
+ return a new {{CSSUnitValue}}
743
+ whose {{CSSUnitValue/unit}} internal slot is set to "number",
744
+ and {{CSSUnitValue/value}} internal slot is set to the product of
745
+ the {{CSSUnitValue/value}} internal slots
746
+ of the [=list/items=] in |values|.
747
+
748
+ 4. If all of the [=list/items=] in |values| are {{CSSUnitValue}} s
749
+ with {{CSSUnitValue/unit}} internal slot set to "number"
750
+ except one which is set to |unit|,
751
+ return a new {{CSSUnitValue}}
752
+ whose {{CSSUnitValue/unit}} internal slot is set to |unit|,
753
+ and {{CSSUnitValue/value}} internal slot is set to the product of
754
+ the {{CSSUnitValue/value}} internal slots
755
+ of the [=list/items=] in |values|.
756
+
757
+ 5. Let |type| be the result of [=multiplying=] the [=types=] of every [=list/item=] in |values|.
741
758
If |type| is failure,
742
759
[=throw=] a {{TypeError}} .
743
760
744
- 5 . Return a new {{CSSMathProduct}} object
761
+ 6 . Return a new {{CSSMathProduct}} object
745
762
whose {{CSSMathProduct/values}} internal slot
746
763
is set to |values|.
747
764
</div>
@@ -765,7 +782,12 @@ The following are the arithmetic operations you can perform on dimensions:
765
782
1. If |this| is a {{CSSMathInvert}} object,
766
783
return |this|’s {{CSSMathInvert/value}} internal slot.
767
784
768
- 2. Otherwise,
785
+ 2. If |this| is a {{CSSUnitValue}} object with {{CSSUnitValue/unit}} internal slot set to "number",
786
+ return a new {{CSSUnitValue}}
787
+ with the {{CSSUnitValue/unit}} internal slot set to "number",
788
+ and a {{CSSUnitValue/value}} internal slot set to the inverse of |this|’s.
789
+
790
+ 3. Otherwise,
769
791
return a new {{CSSMathInvert}} object
770
792
whose {{CSSMathInvert/value}} internal slot
771
793
is set to |this|.
@@ -785,11 +807,19 @@ The following are the arithmetic operations you can perform on dimensions:
785
807
Otherwise,
786
808
prepend |this| to |values|.
787
809
788
- 3. Let |type| be the result of [=adding=] the [=types=] of every [=list/item=] in |values|.
810
+ 3. If all of the [=list/items=] in |values| are {{CSSUnitValue}} s
811
+ and have the same {{CSSUnitValue/unit}} ,
812
+ return a new {{CSSUnitValue}}
813
+ whose {{CSSUnitValue/unit}} internal slot is set to |this|’s {{CSSUnitValue/unit}} internal slot,
814
+ and {{CSSUnitValue/value}} internal slot is set to the minimum of
815
+ the {{CSSUnitValue/value}} internal slots
816
+ of the [=list/items=] in |values|.
817
+
818
+ 4. Let |type| be the result of [=adding=] the [=types=] of every [=list/item=] in |values|.
789
819
If |type| is failure,
790
820
[=throw=] a {{TypeError}} .
791
821
792
- 4 . Return a new {{CSSMathMin}} object
822
+ 5 . Return a new {{CSSMathMin}} object
793
823
whose {{CSSMathMin/values}} internal slot
794
824
is set to |values|.
795
825
</div>
@@ -808,11 +838,19 @@ The following are the arithmetic operations you can perform on dimensions:
808
838
Otherwise,
809
839
prepend |this| to |values|.
810
840
811
- 3. Let |type| be the result of [=adding=] the [=types=] of every [=list/item=] in |values|.
841
+ 3. If all of the [=list/items=] in |values| are {{CSSUnitValue}} s
842
+ and have the same {{CSSUnitValue/unit}} ,
843
+ return a new {{CSSUnitValue}}
844
+ whose {{CSSUnitValue/unit}} internal slot is set to |this|’s {{CSSUnitValue/unit}} internal slot,
845
+ and {{CSSUnitValue/value}} internal slot is set to the maximum of
846
+ the {{CSSUnitValue/value}} internal slots
847
+ of the [=list/items=] in |values|.
848
+
849
+ 4. Let |type| be the result of [=adding=] the [=types=] of every [=list/item=] in |values|.
812
850
If |type| is failure,
813
851
[=throw=] a {{TypeError}} .
814
852
815
- 4 . Return a new {{CSSMathMax}} object
853
+ 5 . Return a new {{CSSMathMax}} object
816
854
whose {{CSSMathMax/values}} internal slot
817
855
is set to |values|.
818
856
</div>
0 commit comments