Re: [csswg-drafts] [css-values-4] Properly handle simplification of sum nodes containing negated sum nodes #13020 (#13069)

Looks good to me. Didn't think of this, but yes, pushing a negate into a sum makes perfect sense for simplification purposes.

Looks like Firefox is failing this test with an *odd* transformation - it pushes the Negate inward, but then further transforms the `min()` into a `max()` with negated arguments, which isn't supported in the spec.

Afaict, Safari is failing the test because it actually faithfully follows the spec, including for Product simplification: in this case (`1 * (min(...) - 10px)`), none of the simplification cases apply (it's got two children, one of which is a number and the other is a Sum, but that Sum does *not* contain only numeric values). Chrome (and Firefox) are simplifying the case regardless, just in different ways - Chrome is turning it into `Sum(Negate(Min(...)), 10px)`, while Firefox, as I say above, is turning it into `Sum(Max(...), 10px)`.

I'll open an issue about this latter transform.

-- 
GitHub Notification of comment by tabatkins
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/pull/13069#issuecomment-4408971723 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Friday, 8 May 2026 18:41:01 UTC