Re: [csswg-drafts] [css-contain] What should container font relative units match against by default? (#9255)

The CSS Working Group just discussed `[css-contain] What should container font relative units match against by default?`, and agreed to the following:

* `ACTION(miriam): File an issue about creating an explicit font container`

<details><summary>The full IRC log of that discussion</summary>
&lt;myles> Topic: [css-contain] What should container font relative units match against by default?<br>
&lt;myles> github: https://github.com/w3c/csswg-drafts/issues/9255<br>
&lt;myles> ntim: we recently added container font relative units. It's unclear which container to query against. If you look at cqw or cqh it can match different containers. If you hae inline size container, then one will match but the other won't<br>
&lt;myles> ntim: So we have the same issue with font relative units. There are a few options. We could create a new container type which is a font container type. We could use the nearest container. We could always require a container name. There are many solutions<br>
&lt;myles> mia: doing it implicitly based on named containers seems to generic. Implicitly based on sized containers maybe is waht people expect. But there's a question if we need to turn it off if we're doing it implicitly. In my mind, we need an explicit way to do it, and we can ask "do we also want inline-size an dize containers to do it implicitly as well"<br>
&lt;myles> mia: my starting proposal is "we want a new container type with a very bikesheddable name"<br>
&lt;emilio> q+<br>
&lt;myles> astearns: there are 3 things there. let's discuss whether we should have an explicit continer type for font units first.<br>
&lt;oriol> q+<br>
&lt;myles> astearns: I want to push back a little. i agree the size containers people would expect the font units to work with them. Is anyone going to want to set a font container with no size contain?<br>
&lt;myles> fantasai: I think that's quite possible<br>
&lt;astearns> ack emilio<br>
&lt;myles> fantasai: if you look at CJK typesetting, there's a lot of measurements in general layout that are with respect to font units. If you have component that's a smaller font size, you need to set that up as a reference, that seems useful.<br>
&lt;myles> s/mia/miriam/<br>
&lt;myles> emilio: Size containers are heavyweight. they depend on layout. this would be a new container that depends on style. having this new font container type involves a bunch of new ... you need to start tracking a bunch of different things. Is it useful to establish a reference point for these? my feeling is maybe not?<br>
&lt;astearns> ack oriol<br>
&lt;myles> oriol: this might be an argument fo rnot making all elements style containser. but if it's automatic, it would make sense to add a new container type for fonts<br>
&lt;myles> ntim: To reply to style containser, the problem is if you say style containers are for font relative units, then every element....<br>
&lt;myles> astearns: you are agreeing<br>
&lt;futhark> q+<br>
&lt;astearns> ack dbaron<br>
&lt;myles> oriol: If this is not the case, you'd need to expicitly set the style container<br>
&lt;ntim> s/then every element/then every element becomes a reference point<br>
&lt;myles> dbaron: my initial intuition is the container font relative units don't require very much, but they are also container size relative units that depend on size containment. I'm wondering if devs will get confused if these things are relative to different containers. Or if the expectation are all relative to the same things? Or maybe we already ahve things relative to different htings already?<br>
&lt;astearns> ack futhark<br>
&lt;myles> miriam: Yes, they are relative to different htings. That's the reason we might want to do this on size containser. It's expected that, since i've created a size container, my units hsould update. So we will want an implicit version. Do we want an explicit version too?<br>
&lt;myles> futhark: I can think of use cases ... but can't we also solve this CSS custom properties and the calculations based on them?<br>
&lt;myles> futhark: I can see use cases where you don't' have size container but you have style container. If you have a specific element that you want to query, can't you do that typically with custom properties? Like, propagate it down with a custom property?<br>
&lt;myles> miriam: Not only that, we said we're going to have the functional version of these units where you can have a container name. That lets you reference a specific container<br>
&lt;myles> futhark: But that could be any named container. It doesn't mean that it has to be a style container or size container. But that woud be explicit anyway, right?<br>
&lt;myles> miriam: Yeah.<br>
&lt;myles> astearns: Alright.<br>
&lt;myles> astearns: Um.<br>
&lt;myles> astearns: we can either resolve to have a font-specific container that we define, or we can decide to do it later<br>
&lt;myles> astearns: if it's warranted.<br>
&lt;myles> astearns: I'm kind of in the second camp, but i'm not going to object to defining it<br>
&lt;myles> miriam: We can add it later. If we're not sure, i'm ok with waiting.<br>
&lt;myles> ACTION(miriam): File an issue about creating an explicit font container<br>
&lt;myles> astearns: Let's move on<br>
&lt;oriol> q+<br>
&lt;myles> astearns: Can we resolve on: inline size containers are containers for font relative units.<br>
&lt;astearns> ack oriol<br>
&lt;miriam> q+<br>
&lt;astearns> ack miriam<br>
&lt;myles> oriol: my concern would be like ... all elements are implicitly style containers, and then we are considering a new type of container, maybe if we implicitly say that inline size containers are also font containers then ... i'm not opposed to it, it's a nicer default, but it makes me worried.<br>
&lt;ntim> q+<br>
&lt;astearns> ack ntim<br>
&lt;myles> miriam: I disagree that it's fighting us. I think this is different from what we want from style containers. We planed ahead that we want different kinds of containers. We are talking about different kinds of containers. Style containers work correctly for what they are doing. Now we are discussing another thing for another use case. That's how we designed it.<br>
&lt;myles> ntim: I can understand oriol. If inline-size contains font, then if we add another one, what's the implication chain look like?<br>
&lt;andruud> It's indeed biting us now, Oriol.<br>
&lt;myles> miriam: ...The dependencies between container types...<br>
&lt;astearns> ack dbaron<br>
&lt;andruud> Lookup on font-size is fundamentally querying style.<br>
&lt;myles> dbaron: to clarify, when you say "inline size container" i think what is meant here is "any containment type that implies inline size containment which today is size and inline-size"<br>
&lt;astearns> ack fantasai<br>
&lt;myles> fantasai: i'm not certain that we want to tie inline size with font if there's no way to un-tie them<br>
&lt;myles> astearns: that's the next thign<br>
&lt;myles> s/thign/thing<br>
&lt;myles> astearns: but yes, that is obviously the next question<br>
&lt;myles> astearns: Let's see if we can resolve that containers that imply inline-size containment also affect the font container units<br>
&lt;dbaron> And this is looking at the container-type and not the containment, right?<br>
&lt;ntim> container-type yes<br>
&lt;ntim> not contain<br>
&lt;myles> miriam: "container for font-relative units"<br>
&lt;myles> miriam: To answer dbaron this is about a container type, not a type of containment<br>
&lt;myles> ntim: oriol had a question<br>
&lt;myles> oriol: I would be more comfortable if there was a way to turn it off<br>
&lt;myles> fantasai: Rather than resolving, can you take a straw poll, "we should resolve inline containment causes font container unit containment" and see how much of the room feels that this is the right direction?<br>
&lt;myles> fantasai: +1 -1 0<br>
&lt;myles> fantasai: We need to feel confident before moving on<br>
&lt;ntim> ntim: 0<br>
&lt;florian> 0<br>
&lt;emilio> 0<br>
&lt;vmpstr> 0<br>
&lt;futhark> 0<br>
&lt;miriam> +1<br>
&lt;astearns> +1<br>
&lt;myles> astearns: "+1" is agreeing to the connection. "-1" is "no, don't make the connection"<br>
&lt;andruud> 0<br>
&lt;jfkthame_> 0<br>
&lt;dbaron> 0<br>
&lt;fantasai> POLL: We should tie font container units to inline-size container type<br>
&lt;oriol> Mild -1<br>
&lt;bramus> 0<br>
&lt;fantasai> -0<br>
&lt;myles> 0 for myles and 0 for hober<br>
&lt;nicole_> 0<br>
&lt;fantasai> myles: fantasai was saying, unless we're confident about going in this direction, we shouldn't resolve on it<br>
&lt;nicole_> oh sorry, +1<br>
&lt;myles> fantasai: it doesn't seem that we have confidence that this is the right answer. we shouldn't do it unless we are confiden<br>
&lt;ntim> q+<br>
&lt;myles> fantasai: there is a way that's a functional notation that we've defined where you can ask for a named container. We can ship those and see if people almost always map them to size containers. Or is there a lot of variation. If they are always using the inline-size containers, then we can do that<br>
&lt;miriam> q+<br>
&lt;astearns> ack ntim<br>
&lt;myles> fantasai: But if they are all over the place, we can make them not connected<br>
&lt;myles> ntim: How we do it in webkit is we will go through all containers with a relevant container type. So we need to know container type.<br>
&lt;astearns> ack myles<br>
&lt;myles> astearns: i think what fantasai is saying that we would require a new container name, and later on relax that requirement<br>
&lt;myles> ntim: Even then, it will look through everything, and filter by type first. And then by name<br>
&lt;myles> fantasai: That's true.<br>
&lt;astearns> ack miriam<br>
&lt;myles> miriam: My comment might not matter since it doesn't work for the implementation, but yeah, I like in theory that we could do that research. But in practice requiring a name on every unit is a lot.<br>
&lt;myles> fantasai: Can we survey web devs who would be interested?<br>
&lt;myles> miriam: Potentially.<br>
&lt;bramus> We can ask around<br>
&lt;nicole_> q+<br>
&lt;myles> nicole_: Maybe people need to try it in order to give reasonable feedback<br>
&lt;dbaron> some way of gathering needs from web developers does seem useful here<br>
&lt;myles> astearns: My intuition is that inline-size is what i'd expect to effect these units. but i might be wrong. It would be good to get author feedback.<br>
&lt;myles> miriam: That's what we want to prototype?<br>
&lt;myles> nicole_: It sounds like we'll either survey devs or make a prototype.<br>
&lt;myles> fantasai: Or maybe both<br>
&lt;myles> fantasai: "Please try the prototype, we are looking for an answer to this question"<br>
&lt;myles> astearns: nicole_, can you sign up for that?<br>
&lt;myles> nicole_: miriam what do you think<br>
&lt;myles> miriam: "i can't tell you what you can prototype"<br>
&lt;ntim> q+<br>
&lt;myles> nicole_: Are there blockers for prototyping?<br>
&lt;myles> miriam: no<br>
&lt;myles> nicole_: ok, we can prototype<br>
&lt;astearns> ack ntim<br>
&lt;astearns> ack nicole_<br>
&lt;myles> ntim: We can introduce a container type "all" and then all would be a shorthand for font, inline-size, size<br>
&lt;myles> miriam: I think that gives us future problems potentially<br>
&lt;dbaron> +1 to miriam<br>
&lt;dbaron> miriam: if we add a new one, does it get added to "all"<br>
&lt;myles> astearns: We are taking this back to the issue for prototyping and survey result. Hopefully soon we can have more info to make better decisions.<br>
&lt;ntim> ntim: I would argue that inline-size is becoming all if we add font to it<br>
</details>


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


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

Received on Friday, 15 September 2023 10:28:59 UTC