Re: [csswg-drafts] [css-anchor-position]: Question: Why is anchor-size() only valid in a sizing property? (#9827)

The CSS Working Group just discussed `[css-anchor-position]: Question: Why is anchor-size() only valid in a sizing property?`, and agreed to the following:

* `RESOLVED: add anchor-size() into the values of properties that take lengths on the list of position-try`

<details><summary>The full IRC log of that discussion</summary>
&lt;emeyer> TabAtkins: An author asked why the anchor-size() functions were only allowed in sizing functions<br>
&lt;emeyer> …It was the obvious restriction at the time, but there are use cases to allow it elsewhere<br>
&lt;emeyer> …At minimum, we should be able to relax this to match the list allowed in position-try<br>
&lt;emeyer> …Ian can talk more about the reasoning in that restriction<br>
&lt;kizu> q+<br>
&lt;astearns> zakim, open queue<br>
&lt;Zakim> ok, astearns, the speaker queue is open<br>
&lt;astearns> q+ kizu<br>
&lt;emeyer> …Roma had questions, but I don't understand them<br>
&lt;emeyer> …anchor-size is a size, but the function has to stay specific to the inset properties<br>
&lt;astearns> ack kizu<br>
&lt;emeyer> …Let's talk about what properties should allow anchor-size()<br>
&lt;emeyer> kizu: In my experiments, I often wanted to use not just the anchor size, but the anchor itself<br>
&lt;emeyer> TabAtkins: Given that anchor size is a difference between two anchors, being able to provide two anchors and get the distance between them sounds doable<br>
&lt;emeyer> fantasai: We should take that as a separate issue<br>
&lt;emeyer> TabAtkins: Ian, could you talk about this?<br>
&lt;emeyer> iank_: I think it's basically the same as if we start messing around with the bits of abspos elements<br>
&lt;emeyer> …It starts to break a lot of optimizations<br>
&lt;emeyer> …I think the insets are fine, with no issues<br>
&lt;emeyer> futhark: I would assume this has the same limiations<br>
&lt;emeyer> TabAtkins: The restriction on not touching the any bits is related to not using it in padding<br>
&lt;emeyer> …I presume it's acceptable to do for paint-time properties like clip-path and background properties<br>
&lt;emeyer> …Is that accurate?<br>
&lt;emeyer> iank_: I'm not sure<br>
&lt;emeyer> …There are some things we think of paint things that do bleed into layout and I'm a little concerned about<br>
&lt;emeyer> TabAtkins: Example?<br>
&lt;emeyer> iank_: There's stuff in inlines and stuff for when we calculate overflow contributions, and then all the table internals may influence layout<br>
&lt;emeyer> …That's a small smattering; I'd need to talk with folks<br>
&lt;astearns> ack fantasai<br>
&lt;emeyer> fantasai: Having it apply only with the properties of position-try is a nice consistent thing to understand<br>
&lt;emeyer> …I think for now, starting with those properties is reasonable<br>
&lt;emeyer> iank_: Anders, any reason that would be bad?<br>
&lt;emeyer> futhark: That seems sensible, yes<br>
&lt;emeyer> TabAtkins: Yeah, we could start with that list and then look to see what we might add to that<br>
&lt;emeyer> fantasai: I don't want to add to that because position-try doesn't participate in the cascade properly<br>
&lt;una> q?<br>
&lt;ydaniv> q+<br>
&lt;emeyer> …If we want to style more properties conditionally, we need a more generic solution to that problem<br>
&lt;una> q+<br>
&lt;fantasai> s/add to that/add properties to @position-try/<br>
&lt;emeyer> TabAtkins: That is a thing we can deal with later, we can use the list from position-try for now and open a new issue to discuss further onward<br>
&lt;emeyer> iank_: I think we're all in agreement about adding anchor-size to the set in position-try<br>
&lt;emeyer> …I think there's a different solution space for the wider problem<br>
&lt;emeyer> ydaniv: What about transforms? Is it possible to include them?<br>
&lt;astearns> ack ydaniv<br>
&lt;emeyer> TabAtkins: That falls into the wider problem, but I agree this would be useful for transitions<br>
&lt;astearns> ack una<br>
&lt;emeyer> …Add it to the list of future discussion<br>
&lt;emeyer> una: Is there a plan forward for generic styling properties?<br>
&lt;emeyer> …There are so many things authors want to adjust based on position and other things<br>
&lt;emeyer> …This general problem keeps coming up in various contexts, of which this is one<br>
&lt;emeyer> …Would really like to have a place to talk about the wider problem instead of hitting it in smaller problems<br>
&lt;emeyer> fantasai: Tab wanted to do that in level 2<br>
&lt;emeyer> iank_: I don't think we should do that with position-try<br>
&lt;florian> q?<br>
&lt;florian> q+<br>
&lt;emeyer> fantasai: We all do want to solve the problem, but it's not going into level 1<br>
&lt;emeyer> una: So we'd do that in 2?<br>
&lt;emeyer> fantasai: This isn't actually that problem, and I'd rather have a solution rather than confusing authors by throwing properties onto a pile<br>
&lt;iank_> q?<br>
&lt;emeyer> …We need to have some kind of an answer that makes sense as to why a thing can be used for one property but not another<br>
&lt;fantasai> s/onto a pile/onto a pile one by one/<br>
&lt;emeyer> florian: We all want to solve the bigger problem some day, so the question is, does this immediate solution depend on the longer-term solution?<br>
&lt;florian> s/depend on the longer-term solution?/depend on the longer-term solution? if not (and it seems not), then let's not discuss the bigger problem _now_.<br>
&lt;emeyer> TabAtkins: propose to add anchor-size() into the values of properties that take lengths on the list of position-try, and tackle the wider problem later<br>
&lt;emeyer> astearns: Any comments or objections?<br>
&lt;emeyer> (silence)<br>
&lt;emeyer> RESOLVED: add anchor-size() into the values of properties that take lengths on the list of position-try<br>
</details>


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


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

Received on Tuesday, 11 June 2024 10:44:27 UTC