Re: [csswg-drafts] [css-color-5] RCS channel keywords interaction with calc() is underspecified (#10280)

The CSS Working Group just discussed `[css-color-5] RCS channel keywords interaction with calc() is underspecified`, and agreed to the following:

* `RESOLVED: none in calc gets turned to 0`

<details><summary>The full IRC log of that discussion</summary>
&lt;emilio> ChrisL: we don't say when it resolves right now<br>
&lt;TabAtkins> q+<br>
&lt;emilio> ... we already have resolutions that there are no `none`s in `calc()<br>
&lt;Rossen> ack florian<br>
&lt;florian> q-<br>
&lt;emilio> ... kinda forgot about this one<br>
&lt;emilio> ... we concluded that we don't let `none` escape `calc()` and that answers most of the questions<br>
&lt;emilio> TabAtkins: that's a reasonable possibility I remember discussing<br>
&lt;Rossen> ack TabAtkins<br>
&lt;emilio> ... the other possibility is to define a channel keyword as an analogous component<br>
&lt;emilio> ... infectious<br>
&lt;emilio> emilio: ISTR discussing both options and deciding the former but might be misremembering<br>
&lt;dbaron> (leaving for the rest of the day)<br>
&lt;emilio> ChrisL: I think with that we answer all of weinig's questions<br>
&lt;emilio> TabAtkins: looking back at the preceding argument and lea didn't like convert to 0<br>
&lt;emilio> ... did she change her mind<br>
&lt;emilio> ChrisL: she didn't<br>
&lt;ChrisL> https://github.com/w3c/csswg-drafts/issues/10211#issuecomment-3807032366<br>
&lt;emilio> emilio: lea, would you be cool defining `none` as `0` in `calc`? Or make `none` infectious?<br>
&lt;emilio> TabAtkins: you argued against `0`<br>
&lt;emilio> lea: I don't like losing `none`, but I don't have anything better to propose in the general case, if we can avoid it in some cases<br>
&lt;emilio> ChrisL: we have that<br>
&lt;emilio> ... converting colors converts powerless to missing, and the other only happens in for different color spaces<br>
&lt;emilio> lea: so if you use `calc(r * 2)` and `r` is `none`, then does it get converted to `0` or kept as `none * 1.2`?<br>
&lt;emilio> ChrisL: with this proposal, `0`<br>
&lt;emilio> emilio: so you're arguing for infectious (`none * 1.2` is `none`)?<br>
&lt;emilio> lea: no<br>
&lt;emilio> ... I want them to get preserved as `none * 1.2` and then resolved when `none` gets a value<br>
&lt;lea> lea: `none` is not `NaN`. `none * 1.2` means "whenever that color gets interpolated, `none` resolves to that component in the other color and then multiplied by 1.2"<br>
&lt;lea> lea: That preserves intent the best, but it may be too complex<br>
&lt;lea> That said, `calc(l * 1.1)` in L expecting to get a slightly lighter tint, and with this, it would get black. That can have a11y implications<br>
&lt;lea> Option 1: none = 0 in `calc()`, always<br>
&lt;emilio> emilio: recap: 1. none = 0 in calc. 2. none behaves infectiously (like NaN), 3. none gets preserved (harder to implement)<br>
&lt;lea> Option 2: calc(something with none) = none, always<br>
&lt;lea> Option 3: none gets preserved, iff same color space<br>
&lt;emilio> TabAtkins: just making sure that there's no difference between calc(r) and r in a relative color<br>
&lt;emilio> [general agreement]<br>
&lt;ChrisL> calc here meaning math functions<br>
&lt;lea> My worry is that none happens organically for certain conversions and Options 1 &amp; 2 break expectations around contrast quite dangerously<br>
&lt;Rossen> 1, 3, 2<br>
&lt;TabAtkins> 1 or 2 (no opinion between them)<br>
&lt;ChrisL> 3, 2, 1<br>
&lt;lea> 3, 1, 2<br>
&lt;astearns> abstain<br>
&lt;kbabbitt> abstain<br>
&lt;kizu> 2, 3, 1<br>
&lt;hoch> abstain<br>
&lt;dshin> abstain<br>
&lt;alisonmaher> abstain<br>
&lt;arronei> 1, 3, 2<br>
&lt;oriol> Maybe 2, but no strong opinion<br>
&lt;Kurt> abstain<br>
&lt;emilio> 1 or 2 indistinctly, 3<br>
&lt;florian> abstain<br>
&lt;miriam> abstain<br>
&lt;emilio> lea: with (1) at least you have clamp() and apply guardrails<br>
&lt;emilio> RESOLVED: none in calc gets turned to 0<br>
</details>


-- 
GitHub Notification of comment by css-meeting-bot
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/10280#issuecomment-4165853609 using your GitHub account


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

Received on Tuesday, 31 March 2026 22:01:40 UTC