Re: [csswg-drafts] [css-color-hdr] How should checking for percentages summing to 0 work in dynamic-range-limit-mix() when calc() is used? (#11678)

> However, since we have the other kind of equivalence mix(a 50%, b 50%) == mix(a 50%, b 50%, c 0%), it would be consistent that mix(a 0%, b 0%) == mix(a 0%, b 0%, c 0%), and now we have a conflict as they result in something different!
(Or did I miss some detail?)

Yeah, I think the right answer is to just make the output transparent black when the sum is zero.

The existing behavior can also be conceptualized as adding an extra argument of `transparent N%`, where N is the leftover % needed to sum to 100%, and in a premultiplied color space that's exactly identical to the current behavior *and* is well-defined all the way down to 0%.  In a non-premultiplied space you have to handle things slightly more manually (thus the current text), but continuing to treat this as the preferred mental model, the limit behavior at 0% should still result in `transparent`.

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


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

Received on Wednesday, 26 February 2025 21:22:17 UTC