- From: CSS Meeting Bot via GitHub <sysbot+gh@w3.org>
- Date: Wed, 12 Jun 2024 11:30:49 +0000
- To: public-css-archive@w3.org
The CSS Working Group just discussed `[css-color-5] RCS channel keywords interaction with calc() is underspecified`. <details><summary>The full IRC log of that discussion</summary> <fantasai> ChrisL: About preserving numeric values of keywords<br> <fantasai> ChrisL: is it parse-time, computed-time, or used-time resolution?<br> <fantasai> ChrisL: Color 5 doesn't specify<br> <fantasai> ChrisL: if you do calc(none * 2) what do you get?<br> <fantasai> ChrisL: does it evaluate to none or nan or what?<br> <fantasai> ChrisL: no discussion<br> <fantasai> fserb: is it different from what we just discussed?<br> <fantasai> ChrisL: seems related<br> <fantasai> ChrisL: but about whether you preserve calc() explicitly as calc()<br> <emilio> https://github.com/w3c/csswg-drafts/issues/10211 is part of it, whether `none` should be infectious like `nan` or not<br> <fantasai> dbaron: I think we have general principle for calc() that we resolve at multiple value stages<br> <fantasai> dbaron: if you can resolve at earlier stages, you do; if not then preserve to later stages<br> <fantasai> dbaron: I think that's what happens for <length> calc(), e.g. calc(1in + 5pt) gets resolved immediately<br> <fantasai> dbaron: but calc(1in + 1em) needs font-size, so resolve it later<br> <fantasai> dbaron: maybe that applies to some degree here?<br> <emilio> q+<br> <lea> q+<br> <fantasai> emilio: also issue of what does multiplying by none even mean?<br> <fantasai> emilio: Another issue linked which discussed it a bit<br> <fantasai> emilio: what I proposed was to make none infectious like nan<br> <fantasai> emilio: but lea wasn't happy about that<br> <fantasai> emilio: so designing what to do with none changes when you can resolve some of these calcuations<br> <fserb> q+<br> <emilio> s/designing/deciding<br> <fantasai> lea: Reason is, when you have none<br> <dbaron> (Yeah, I have no idea what it means to do math on none....but I'm also not following this spec that closely.)<br> <fantasai> lea: can have e.g. clamp(0.5, none, 0.6)<br> <fantasai> lea: that means give me value from other color, and clamp it<br> <fantasai> lea: if it's infectious, that could mean lightness is unrestricted which could make text unreadable<br> <fantasai> lea: not sure what 'none * 2' means.<br> <fantasai> lea: if you interpolate with another color, then none becomes value of the other component and then is multiplied<br> <fantasai> lea: so color-mix() in oklch<br> <lea> color-mix(in oklch, oklch(calc(none * 2) .1 180), oklch(.5 .1 180)) =<br> <fantasai> lea: that would produce...<br> <lea> oklch(1 .1 180)<br> <fantasai> lea: it's like a late ariable<br> <fantasai> s/aria/varia/<br> <fantasai> miriam: for a specific use case, none + 180 in a hue is a common use case<br> <fantasai> dbaron: just to throw out an example that's awful<br> <fantasai> dbaron: if you have calc() on none in both colors in a color-mix, need to say what happens<br> <fantasai> dbaron: presumably none in the result?<br> <fantasai> lea: I think this was well-defined<br> <fantasai> lea: if both none-containing expressions, then you use calc-mix() to interpolate until you can resolve the nones<br> <fantasai> dbaron: but only meaningful if then mixed with something else?<br> <fantasai> lea: yes, either mix with something not none, or become zero<br> <fantasai> dbaron: ok<br> <fantasai> fserb: I think everything inside calc() is context-dependent<br> <fantasai> fserb: calc(none + 180) going to do something on the other side<br> <fantasai> fserb: calc has to be resolved before you do relative color syntax<br> <fantasai> fserb: You cannot leave the relative color syntax without resolving the number<br> <fantasai> fserb: the number resolves ...<br> <fantasai> fserb: the number that calc() returns, it depends on that context<br> <fantasai> fserb: if you converting from anything with a hue, calc(180) you can't keep calc and [missed]<br> <fantasai> lea: this is confusing<br> <fantasai> fserb: if you keep calc() means you won't look inside until later on<br> <fantasai> fserb: to move forward on relative color syntax, it needs to become a number<br> <dbaron> maybe I'm not ok with that answer... still confused about what color-mix(in oklch, oklch(.5 .1 calc(none + 180)), calc(.3 .1 calc(none + 180)) means...<br> <fantasai> fserb: it's only meaningful as a number, not as an unresolved calc()<br> <fantasai> lea: what is the proposal?<br> <fantasai> fserb: calc() cannot be carried out of relative color syntax<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-2162777644 using your GitHub account -- Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Wednesday, 12 June 2024 11:30:50 UTC