Re: [csswg-drafts] [css-anchor-position] Alignment shouldn't interfere with sizing (#10315)

The CSS Working Group just discussed `[css-anchor-position] Alignment shouldn't interfere with sizing`.

<details><summary>The full IRC log of that discussion</summary>
&lt;emilio> fantasai: the current anchor-center definition changes the avail size for sizing the abspos to the largest rect that can be centered wrt the anchor that fits within its inset area<br>
&lt;emilio> ... so if your anchor is in the center on the screen you have all the regular stuff<br>
&lt;TabAtkins> q+<br>
&lt;emilio> ... but if you're in the edge of the screen you have a little bit of space<br>
&lt;emilio> ... alignment never affects the avail space<br>
&lt;emilio> ... this would be a first<br>
&lt;iank_> q+<br>
&lt;emilio> ... alignment takes the box and avail space and alings it<br>
&lt;emilio> ... I think that's what we should do for anchor-center<br>
&lt;emilio> ... if the author wants to resize the anchor we should provide keywords in the inset or what not properties to enable that<br>
&lt;astearns> ack TabAtkins<br>
&lt;emilio> ... so I think the anchor-center kw should say "size the box in this container, and move it as close to the desired alignment without overflowing the container"<br>
&lt;emilio> TabAtkins: this is novel for alignment<br>
&lt;emilio> ... but that's not needed for existing alignment values<br>
&lt;emilio> ... this isn't true for anchor-center<br>
&lt;emilio> ... if half your size is larger than the distance to the closer edge<br>
&lt;emilio> ... then you overflow if you stay centered<br>
&lt;emilio> ... in particular if you fill the cb then you're almost guaranteed to overflow<br>
&lt;emilio> fantasai: that's not what I'm proposing tho<br>
&lt;emilio> TabAtkins: right, two posibilities<br>
&lt;emilio> ... (1) is the current behavior<br>
&lt;emilio> ... which has this edge case but looks good pretty good if you're in the middle<br>
&lt;emilio> ... looks better than growing to the full size and align<br>
&lt;emilio> ... (2) is what you suggest<br>
&lt;emilio> ... this was what the spec originally said<br>
&lt;emilio> ... but the sliding behavior needs to be available to more than anchor-center<br>
&lt;emilio> ... bikeshed does this for left-aligned anchors for example<br>
&lt;emilio> ... but whatever you do it can't be locked to anchor-center<br>
&lt;emilio> ... when we come up with something that does the sliding, it should disable this shrink-avail-size bit<br>
&lt;fantasai> una made a visual of this issue in https://github.com/w3c/csswg-drafts/issues/9960#issuecomment-1944518084<br>
&lt;emilio> ... so I wrote the spec the way it is because it looks better in the majority of cases<br>
&lt;emilio> ... you can kinda fix this with min-size (though it's not perfect because you'd overflow)<br>
&lt;emilio> ... but when we have the sliding bit then it should work just fine<br>
&lt;astearns> ack iank_<br>
&lt;emilio> ... if we do the sliding I'm concerned about doing it too early before knowing what it'd look more generally<br>
&lt;emilio> iank_: we do have changing of avail space in inset-{axis}: auto in rtl<br>
&lt;emilio> ... there are cases where this happens<br>
&lt;astearns> ack fantasai<br>
&lt;emilio> fantasai: yeah static pos...<br>
&lt;emilio> ... I see what your concern is<br>
&lt;emilio> ... there's another issue I filed that should get us there<br>
&lt;emilio> ... I feel strongly that alignment should not change sizing<br>
&lt;emilio> ... my suggestion is that maybe we defer this issue, we have a chat about the other issue<br>
&lt;emilio> ... if we have a system that works then we can come back to this issue<br>
&lt;emilio> ... I'd much rather give authors control about this<br>
&lt;emilio> TabAtkins: what's the other issue?<br>
&lt;emilio> fantasai: #10316<br>
&lt;kizu> +1 to fantasai that align should not resize things, I had cases in my experiments where this behavior was not what I wanted, and I almost would always prefer sliding behavior (which _sounds_ like something close to how `position: sticky` could work)<br>
&lt;emilio> TabAtkins: happy with that<br>
&lt;emilio> ... there are slight tricks we could do to minimize the<br>
&lt;emilio> ... bad case here<br>
&lt;emilio> ... but we can chat<br>
&lt;emilio> astearns: let's leave open and come back after TabAtkins and fantasai have discussed the other one<br>
&lt;TabAtkins> ah yeah i haven't seen 10316 yet, cool<br>
</details>


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


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

Received on Wednesday, 22 May 2024 17:00:54 UTC