Re: [csswg-drafts] [css-color-5] How should negative percentages behave in color-mix()? (#6047)

So, I've coded up the percent normalization per the current specification to demonstrate the divde by zero issue. You can enter any number, negative or postive, and all cases seem to resolve to a sum of 100, except when given two percentages that sum to zero: https://codepen.io/facelessuser/pen/eYBLWjd.

So, if things remain as specified in the spec to extrapolate colors beyond the bounds of 0 - 100, this case seems it would need to be defined as the current behavior is undefined. Do you just return a transparent black color? Do you just not mix in this case and return the first color?

Side note: The spec should also put some round brackets around: `p1 / p1 + p2` -> `p1 / (p1 + p2)`.

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


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

Received on Saturday, 6 March 2021 14:25:15 UTC