Re: [css-houdini-drafts] [css-typed-om-1] "equal numeric values" may return false when people might expect true

Yeah it will currently return false. There are many definitions of "equal" that we can go with here (some easy, some intractable). I think we should just pick one that's not too opinionated and allow the user to define fancier equalities as they desire by traversing the tree.

Some ideas:
1. Structural equality where order matters (i.e. `CSSMathSum(1px, 2px) != CSSMathSum(2px, 1px)`).
2. Structural equality where order doesn't matter (i.e. `CSSMathSum(1px, 2px) == CSSMathSum(2px, 1ps)`).
3. Structural equality after "simplification" (i.e. your example will return true).

IMHO 3 is difficult to get right. I'm ok with either 1 or 2. Can we take inspiration from another spec or maybe JavaScript itself?

-- 
GitHub Notification of comment by darrnshn
Please view or discuss this issue at https://github.com/w3c/css-houdini-drafts/issues/682#issuecomment-366130692 using your GitHub account

Received on Friday, 16 February 2018 02:49:24 UTC