- From: CSS Meeting Bot via GitHub <sysbot+gh@w3.org>
- Date: Wed, 02 Apr 2025 18:26:08 +0000
- To: public-css-archive@w3.org
The CSS Working Group just discussed `[css-contain-4] Define a range syntax for style container queries`, and agreed to the following: * `RESOLVED: accept 3 part resolution in https://github.com/w3c/csswg-drafts/issues/8376#issuecomment-2751161553` <details><summary>The full IRC log of that discussion</summary> <kbabbitt> miriam: a lot of interest in style queries where we're looking at value of custom prop on parent<br> <kbabbitt> ... a lot of interest in a range syntax there<br> <kbabbitt> ... e.g. instead of "is the value of my-custom-lenght exactly 1em"<br> <kbabbitt> .. should be able to say "is it more or less than 1em"<br> <kbabbitt> ...various use cases<br> <astearns> proposal: https://github.com/w3c/csswg-drafts/issues/8376#issuecomment-2751161553<br> <bkardell> s/my-custom-lenght/my-custom-length<br> <kbabbitt> ... anders proposed we should be able tyo solve this<br> <kbabbitt> ... my final comment linked to his proposal<br> <bkardell> s/tyo/to<br> <kbabbitt> ... adopt MQ range syntax including sandwich form<br> <kbabbitt> ... each part can be an order reference to a custom prop<br> <kbabbitt> ... equals syntax would match based on value<br> <kbabbitt> ... so 1.0 would equal 1<br> <kbabbitt> .. whereas current syntax would match serialization which is how it works already<br> <kbabbitt> ... so that would be breaking<br> <kbabbitt> ... some more detail in there<br> <kbabbitt> ... as I understand proposal, we wouldn' tneed to register custom props with any particular type<br> <TabAtkins> q+<br> <kbabbitt> ... would parse them as any of the numeric types to see if they match<br> <kbabbitt> ... if not return false<br> <kbabbitt> ... thoughts?<br> <astearns> ack TabAtkins<br> <kbabbitt> TabAtkins: support this<br> <kbabbitt> ... as described exactly<br> <kbabbitt> ... one detail of this: this technically means you could just do pure numeric comparison<br> <kbabbitt> ... don't need to mention custom prop at all<br> <kbabbitt> ... think that's fine<br> <kbabbitt> ... going back to yesterday, with if() doing comparisons<br> <kbabbitt> ... we should amend that to match<br> <kbabbitt> ... so that condition and if function work the same way<br> <kbabbitt> astearns: any other places besides style queries where we need this?<br> <kbabbitt> TabAtkins: only other similar place is MQs<br> <kbabbitt> ... those are explicit that you need a media feature on one side<br> <kbabbitt> astearns: OK<br> <kbabbitt> miriam: other nice to have here would be special casing 0 to allow comparison to length<br> <astearns> ack dbaron<br> <kbabbitt> dbaron: I like the initial proposal<br> <kbabbitt> ... haven't looked into in as much detail as others<br> <TabAtkins> don't necessarily need a zero special-case. sign() returns -1, 0, 1 i think, right?<br> <kbabbitt> ... a little nervous about what TabAtkins just said<br> <kbabbitt> ... there's a bunch of restrictions around style queries that don't apply to ? 10px<br> <kbabbitt> ... maybe restrictions do apply, was thinking they didn't<br> <kbabbitt> ... so never mind<br> <kbabbitt> TabAtkins: there's other restrictions on other conditions, but style queries are resolved on element itself, not container, should be fine<br> <emilio> q+<br> <astearns> ack emilio<br> <kbabbitt> emilio: on the 0 and lengths: do we know if we allow unitless lengths in MQs right now?<br> <kbabbitt> ... I think we might now<br> <kbabbitt> s/now/not/<br> <kbabbitt> ...not that there's a big use case<br> <kbabbitt> ... would prefer to defer it<br> <kizu> We allow: https://codepen.io/kizu/pen/ByaPWQv<br> <kbabbitt> ... because when you're parsing the terms you dont know what's going to be on the right hand side<br> <kbabbitt> ... need to work backwards<br> <kbabbitt> ... 0 > 0 comparing lengths or numbers?<br> <kbabbitt> astearns: in the interest of time, I think we should punt on unitless 0 for now<br> <kbabbitt> emilio: seems fine esp if we do in MQs<br> <kbabbitt> astearns: Proposal is to accept 3 part resolution in Anders's comment<br> <TabAtkins> https://github.com/w3c/csswg-drafts/issues/8376#issuecomment-2751161553<br> <miriam> https://github.com/w3c/csswg-drafts/issues/8376#issuecomment-2751161553<br> <kbabbitt> astearns: questions or comments?<br> <kbabbitt> lea: [asking about colon semantics]<br> <kbabbitt> astearns: that's describing what syntax has now<br> <kbabbitt> lea: does property registered or not matter?<br> <kbabbitt> miriam: registering fixes that<br> <kbabbitt> miriam: if unregistered, blue != blue<br> <kbabbitt> TabAtkins: bit about colon isn't meant to change behavior<br> <TabAtkins> (blue is equal to blue, but it's not equal to #0000ff<br> <TabAtkins> )<br> <kbabbitt> lea: do we want to allow these kinds of bare idents in there?<br> <kbabbitt> TabAtkins: we allow bare idents in MQ conditional form<br> <kbabbitt> ... so consistency<br> <kbabbitt> TabAtkins: "width < 600px"<br> <kbabbitt> astearns: objections?<br> <kbabbitt> RESOLVED: accept 3 part resolution in https://github.com/w3c/csswg-drafts/issues/8376#issuecomment-2751161553<br> </details> -- GitHub Notification of comment by css-meeting-bot Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/8376#issuecomment-2773374483 using your GitHub account -- Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Wednesday, 2 April 2025 18:26:09 UTC