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`, and agreed to the following:

* `RESOLVED: add a function for every container query unit that allow to reference a named container`

<details><summary>The full IRC log of that discussion</summary>
&lt;emeyer> miriam: There are two function proposal on this<br>
&lt;emeyer> …There’s concern about using actual lengths in these functions<br>
&lt;emeyer> …Idea is to be able to query for a specific container<br>
&lt;emeyer> …Could query for container 10cqi and a container name<br>
&lt;emeyer> …Idea 1: a new function for each container unit<br>
&lt;emeyer> …Woulc take the argument of a container name<br>
&lt;emeyer> …Idea 2: Have a general container unit reference function<br>
&lt;emeyer> …Something like `container-unit(&lt;unit>,&lt;container-name>)`<br>
&lt;emeyer> …Could use this in calc() to do whatever math is needed<br>
&lt;emeyer> …This is a little bit bulky that would help authors clean this up a bit, but it’s a good start<br>
&lt;emeyer> …I like the second idea; probably needs some bikeshedding on the name<br>
&lt;TabAtkins> happy with either, honestly<br>
&lt;emeyer> astearns: Anyone with opinions or dislikes?<br>
&lt;TabAtkins> latter is verbose but the functionality makes sense<br>
&lt;emeyer> emilio: There are units that don’t make sense in a container function, right?<br>
&lt;emeyer> miriam: Yeah<br>
&lt;emeyer> fantasai: The only relevant units are font-relative and container-relative<br>
&lt;emeyer> emilio: I’m not particularly opposed, but some of these seem like they could be handled differently<br>
&lt;emeyer> …This feels a bit weird<br>
&lt;TabAtkins> q+<br>
&lt;emeyer> …I have a slight preference for the first option, but not strong<br>
&lt;astearns> ack fantasai<br>
&lt;astearns> ack TabAtkins<br>
&lt;emeyer> fantasai: I like that the first idea is easier to type and is a straightforward extension of existing syntax<br>
&lt;emeyer> TabAtkins: I agree with emilio that the general function is a little funky<br>
&lt;emeyer> …We could make a cqem unit and corresponding function, so I think I’d be happier with dedicated functions<br>
&lt;emilio> +1<br>
&lt;emeyer> …Plus a non-binding intent to always have a function that goes with any new CQ unit<br>
&lt;emeyer> astearns: I’m a little excited about the more vague function — why just units, why not custom properties?<br>
&lt;emeyer> TabAtkins: That wouldn’t be the container unit function which needs to be a math function<br>
&lt;astearns> ack fantasai<br>
&lt;emeyer> fantasai: I think we should start where we can make things so we treat this like a unit<br>
&lt;emeyer> miriam: The custom units proposal would let you wire that uop<br>
&lt;emeyer> s/uop/up/<br>
&lt;emeyer> astearns: Sound like we’re converging on idea one, where every unit gets a corresponding function<br>
&lt;fantasai> s/make things so we treat this like a unit/with this syntax which is easy to use and we'll want anyway, even if we have a more generic function. Also I think it would be nice if we could make it behave more like a unit.../<br>
&lt;emeyer> RESOLVED: add a function for every container query unit that allow to reference a named container<br>
&lt;emeyer> s/allow/allows/<br>
&lt;fantasai> cqi(&lt;container-name>)<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-1479851431 using your GitHub account


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

Received on Wednesday, 22 March 2023 16:04:54 UTC