You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The rules for creating a sum value from a CSSNumericValue have wording in the part about processing a CSSMathProduct that says:
Let item be a tuple with its value set to the product of the values of item1 and item2, and its unit map set to the union of the unit maps of item1 and item2, with all entries with a zero value removed.
The concept of how to union unit maps isn't defined (or at least it isn't a link here), and I didn't see a definition where unit maps are defined.
It seems like unioning unit maps should merge identical units, for example unioning ["px" → 1] and ["px" → 2] should yield ["px" → 3]. Likewise, unioning ["px" → 1] and ["px" → -1] should yield []. I don't think those follow from a straightforward interpretation of the word "union", but I think they are what is expected. (I think the straightforward interpretation of "union" does work when the types are different, though.)
Given that, I also wonder if the concept should be called multiplying rather than unioning.
The text was updated successfully, but these errors were encountered:
The rules for creating a sum value from a
CSSNumericValue
have wording in the part about processing aCSSMathProduct
that says:The concept of how to union unit maps isn't defined (or at least it isn't a link here), and I didn't see a definition where unit maps are defined.
It seems like unioning unit maps should merge identical units, for example unioning
["px" → 1]
and["px" → 2]
should yield["px" → 3]
. Likewise, unioning["px" → 1]
and["px" → -1]
should yield[]
. I don't think those follow from a straightforward interpretation of the word "union", but I think they are what is expected. (I think the straightforward interpretation of "union" does work when the types are different, though.)Given that, I also wonder if the concept should be called multiplying rather than unioning.
The text was updated successfully, but these errors were encountered: