Re: [csswg-drafts] [css-contain-3] Reference named containers for cq units (#7858)

The CSS Working Group just discussed `[css-contain-3] Reference named containers for cq units`.

<details><summary>The full IRC log of that discussion</summary>
&lt;dael> miriam: The request is with ontainer quereis want to query a specific container. Can do with full syntax but not w.ith units. Units give nearest container with right dimenions. It's a good default<br>
&lt;dael> miriam: Nice if you can get the width, height, etc from a specific container<br>
&lt;dael> miriam: Prop is starting ith cq functions that match unitis cqw, cqh, etc. Function takes 1 arg which is name of container. Returns the value of @unit. You can use that in calc, multiply by something, and query a specific container.<br>
&lt;dael> miriam: Bonus request is do we allow function appended to a value is same way as with custom units. Nice to do with functions. Functions are powerfut even without<br>
&lt;dael> TabAtkins: New functional unit is brand new syntax. Not a problem, but just for conservitiveness I think we want to lean existing pattern. I would think takes cq-length and contextually interprets based on cintainer name as other argument<br>
&lt;dael> miriam: Suggestion a function that's both multiplier and name?<br>
&lt;TabAtkins> container-reference(10cqi, card)<br>
&lt;dael> TabAtkins: Same as nmn (sp?)<br>
&lt;dael> TabAtkins: THis function ^ Relative to name from second argument<br>
&lt;ntim> q+<br>
&lt;dael> miriam: Could work. As soon as looking at container-reference with 2 arg does ti have broader uses? container-reference(2em, card) I would use<br>
&lt;dael> TabAtkins: We could define tightly and extend. If we go for more than 1 dimension, aka a calc of stuff, I suppose works. It's more work impl-wise<br>
&lt;dael> fantasai: All of this is longer to type than calc, right? calc with a bunch of functions would be easier<br>
&lt;miriam> calc(10 * cqw(card))<br>
&lt;miriam> container-reference(10cqi, card)<br>
&lt;dael> TabAtkins: What I desc is shorter than doing same thing with calc. If it's conainer reference that takes name and returns the unit length that's longer<br>
&lt;astearns> ack ntim<br>
&lt;fantasai> how is that strictly longer<br>
&lt;dael> ntim: Would it allow querying the units for containers outside of the container chain?<br>
&lt;dael> ntim: And any concerns if it is allowed?<br>
&lt;dael> miriam: The way I was thinking of it is resolves same as container queries so has to be ancestor<br>
&lt;dael> astearns: Nearest ancestor whose name matches<br>
&lt;dael> astearns: One minute left. Hearing this is good to have but a bit of quibbling over syntax.<br>
&lt;dael> miriam: Can take it back to the issue<br>
&lt;TabAtkins> hm, i guess functions with the name of the cq* unit lets you collapse things down to a pretty short thing.<br>
&lt;dael> astearns: Yep. Let's take it back to the issue and go over syntax, but let's try and take this up. Seems like it will be very useful<br>
</details>


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


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

Received on Thursday, 5 January 2023 01:00:20 UTC