Re: [csswg-drafts] [css-anchor-1] Allow anchoring to a particular fragment (#8895)

The CSS Working Group just discussed `[css-anchor-1] Allow anchoring to a particular fragment`, and agreed to the following:

* `RESOLVED: add margin-box and border-box keywords`
* `RESOLVED: add properties position-anchor-name and position-anchor-box as longhands of position-anchor`

<details><summary>The full IRC log of that discussion</summary>
&lt;emeyer> TabAtkins: It was raised that there's several possible boxes of an anchor that could be anchored to<br>
&lt;emeyer> …Spec says the axis-aligned bounding box of fragments<br>
&lt;emeyer> …This is reasonable most of the time, but there are probably cases where we want to anchor to other boxes, like the margin box<br>
&lt;emeyer> …There's plenty of space in the syntax to declare which box or fragment you want to anchor to<br>
&lt;emeyer> …There are some proposed values like first and last; I might want first-fragment and last-fragment to be more clear<br>
&lt;fantasai> +1 to longer keyword for first/last fragment<br>
&lt;astearns> q+<br>
&lt;emeyer> …We would still default to the current behavior<br>
&lt;iank_> q+<br>
&lt;emeyer> …Does this sound like something reasonable to pursue?<br>
&lt;emeyer> astearns: Box keywords, absolutely; not so convinced about fragments<br>
&lt;astearns> ack astearns<br>
&lt;emeyer> TabAtkins: If something's split across a column-break, you probably want to pick one of the two fragments at some point<br>
&lt;kizu> q+<br>
&lt;una> q+<br>
&lt;astearns> ack iank_<br>
&lt;emeyer> iank_: Just making sure this is grounded in use cases<br>
&lt;emeyer> TabAtkins: Are any of the boxes a problem?<br>
&lt;astearns> ack iank_<br>
&lt;khush> q+<br>
&lt;emeyer> iank_: Inner boxes like content and padding, but implementations tend to ignore the existence of scrollbars<br>
&lt;emeyer> …In CSS shapes, browser get the padding box wrong when there's a scrollbar<br>
&lt;emeyer> …Fine to have these values, but just want to make sure people are asking for them first<br>
&lt;emeyer> TabAtkins: Border and margin are the most obvious to have, and I don't like subsetting, but I'm okay with it to the extent that values are working well<br>
&lt;emeyer> iank_: Generally, padding-box and content-box of everything is broken with respect to scrollbars<br>
&lt;astearns> ack fantasai<br>
&lt;emeyer> fantasai: I think a major use case for fragments is sometimes people want to put a doohickey at the beginning or end of an inline that can wrap to multiple lines<br>
&lt;emeyer> …I expect this would be used a lot when does against inline boxes<br>
&lt;emeyer> …Tab's CSS Day demo showed these box values would be valuable<br>
&lt;emeyer> …Content and padding are not as useful for a lot of use cases, but you could use them to place things on top of an anchor, like a "New" banner in the corner of some content<br>
&lt;astearns> ack kizu<br>
&lt;emeyer> kizu: With wrapping inline elements, JS tooltips have this problem as well<br>
&lt;astearns> ack una<br>
&lt;emeyer> …Wrapping through columns is the same case, but would we want to attach to whole column fragments?<br>
&lt;emeyer> una: I think anchors are confusing to authors<br>
&lt;emeyer> s/anchors/fragments/<br>
&lt;emeyer> TabAtkins: I don't think we've really exposed fragments to authors; let's open an issue about terminology, or continue in this one<br>
&lt;astearns> ack khush<br>
&lt;emeyer> khush: When we did view transitions, this came up there as well<br>
&lt;khush> https://github.com/w3c/csswg-drafts/issues/8339#issuecomment-1470268830<br>
&lt;emeyer> …It would be nice if we had a generic syntax to deal with other cases of fragments<br>
&lt;emeyer> …I vaguely recall us talking about being able to put this in selectors<br>
&lt;emeyer> iank_: No no no<br>
&lt;emeyer> TabAtkins: Good to know<br>
&lt;emeyer> fantasai: Back to margin/border box keywords, we also need to be able to specify this for the default anchor<br>
&lt;emeyer> …IN our exploration last July, position-anchor was a shorthand that let you include name and box<br>
&lt;emeyer> …Not sure what to do with the fragments case<br>
&lt;astearns> q?<br>
&lt;emeyer> …What do authors call it when a thing splits across lines?<br>
&lt;astearns> ack fantasai<br>
&lt;Zakim> fantasai, you wanted to point out for margin-box etc need to add it to default anchor<br>
&lt;iank_> itsy-bitsy-splitsy-box<br>
&lt;fantasai> https://fantasai.inkedblade.net/style/specs/css-anchor-exploration/#anchor-positioning<br>
&lt;emeyer> TabAtkins: I suggest we resolve to add margin-box and border-box keywords to anchor functions and position-anchor, and I'll open an issue about padding-box and content-box keywords, and we resolve to do something with fragmentation but we need to figure terminology<br>
&lt;fantasai> position-anchor -> position-anchor-name + position-anchor-box<br>
&lt;emeyer> astearns: A general fragmentation thing would be useful, but in this case, do we only want to have access to the first and last fragments?<br>
&lt;emeyer> fantasai: Yes<br>
&lt;emeyer> TabAtkins: Yes<br>
&lt;emeyer> astearns: Any objections to the first resolution?<br>
&lt;emeyer> (silence)<br>
&lt;emeyer> RESOLVED: add margin-box and border-box keywords<br>
&lt;emeyer> fantasai: We need to also resolve to add these to anchor-position property<br>
&lt;dbaron> s/keywords/keywords to anchor functions/<br>
&lt;astearns> s/anchor-position/position-anchor/<br>
&lt;emeyer> …We probably want to split those into longhands position-anchor-name and position-anchor-box<br>
&lt;emeyer> …Any objections to adding those?<br>
&lt;emeyer> (silence)<br>
&lt;emeyer> RESOLVED: add properties position-anchor-name and position-anchor-box as longhands of position-anchor<br>
&lt;RRSAgent> I have made the request to generate https://www.w3.org/2024/06/11-css-minutes.html fantasai<br>
&lt;fantasai> s/ARIA is the right approach/asking authors to use ARIA markup directly is the right approach/<br>
</details>


-- 
GitHub Notification of comment by css-meeting-bot
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/8895#issuecomment-2160220529 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 09:21:37 UTC