- From: CSS Meeting Bot via GitHub <noreply@w3.org>
- Date: Wed, 24 Sep 2025 15:36:05 +0000
- To: public-css-archive@w3.org
The CSS Working Group just discussed ``[css-values-5] Allow `if()` in descriptors``, and agreed to the following: * `RESOLVED: Work on this in the next level (in consideration of all the complications outlined above).` <details><summary>The full IRC log of that discussion</summary> <fantasai> TabAtkins: We have if() function which allows conditional tests. But only works in properties, because substitution functions are only defined in that context<br> <fantasai> TabAtkins: but there are good use cases for being able to use if() with global tests like MQ<br> <fantasai> TabAtkins: It could be done by using conditional at-rules today<br> <lea> q?<br> <fantasai> TabAtkins: if() is a nice syntactic convenience.<br> <fantasai> TabAtkins: Anders says it's doable as long as we're clear which tests can be used outside an element ocntext<br> <fantasai> TabAtkins: I agree, should be useful. Right now just style query and color scheme query that we'd have to turn off. But doable<br> <fantasai> TabAtkins: So I suggest we accept this feature, spec text TBD<br> <lea> +1, many upsides, little to no downsides<br> <astearns> ack fantasai<br> <TabAtkins> fantasai: I think it makes sense, but rather than excluding we should use an allowlist<br> <emilio> q+<br> <TabAtkins> TabAtkins: agree<br> <lea> q+<br> <TabAtkins> fantasai: like there's a lot of variable stuff we can't do outside of an element context<br> <astearns> ack emilio<br> <fantasai> emilio: relatedly, there might be descriptors (e.g. @font-face) ...<br> <fantasai> emilio: even in the case in the OP, @font-face is exposed to the FontFace API<br> <fantasai> emilio: It's fairly different from media case<br> <fantasai> emilio: I'm not sure how we should expose these values when you ask for them<br> <fantasai> emilio: Seems weird to do the substitution when you do the getter<br> <fantasai> emilio: requires updating style information, it's a bit annoying<br> <fantasai> TabAtkins: currently those return strings<br> <fantasai> TabAtkins: so I think it's fine?<br> <fantasai> TabAtkins: we'd have to define how substitutions are reflected<br> <fantasai> TabAtkins: and I think it's fine to say that the OM doesn't reflect substitutions<br> <fantasai> emilio: That means the programmatic functions need to accept these, and those are exposed to workers, which is annoying<br> <fantasai> emilio: There's a lot of edge cases to think about<br> <fantasai> emilio: And that's just the @font-face ones<br> <fantasai> emilio: And then @page stuff might affect MQ?<br> <fantasai> astearns: So seems useful thing, but complications to work through.<br> <astearns> ack lea<br> <fantasai> lea: Do we need to exclude variables syntactically?<br> <fantasai> lea: Could define that variables resolve to their initial value.<br> <fantasai> lea: idk if web compatible<br> <fantasai> lea: but as an author, that's what I would expect<br> <fantasai> TabAtkins: I would say that those tests, not on allow list, would just resolve to false<br> <fantasai> TabAtkins: that would potentially allow us to turn on some tests in the future<br> <astearns> ack fantasai<br> <TabAtkins> fantasai: given all that, I think we should maybe defer this to later... I don't want us to spend tons of times going down the rabbit holes and delaying if() on elements<br> <TabAtkins> fantasai: so maybe say this is a good idea, but for the next level. sounds like it'll be a bunch of work on the spec and impl side, for something that is technically doable right now in other ways<br> <emilio> +1<br> <TabAtkins> fantasai: so I worry if we batch it all together it'll be slower to get the core feature interoperable<br> <TabAtkins> astearns: so we could resolve to accept it but punt to the next level. no more delay needed<br> <TabAtkins> astearns: agree we shoudln't gate the existing if() on this<br> <TabAtkins> +1<br> <fantasai> PROPOSED: Work on this in the next level.<br> <fantasai> RESOLVED: Work on this in the next level (in consideration of all the complications outlined above).<br> </details> -- GitHub Notification of comment by css-meeting-bot Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/11941#issuecomment-3329498991 using your GitHub account -- Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Wednesday, 24 September 2025 15:36:09 UTC