- From: Tab Atkins Jr. via GitHub <sysbot+gh@w3.org>
- Date: Thu, 20 Jul 2023 17:31:27 +0000
- To: public-css-archive@w3.org
> (i. e. unique for the entire document). Yeah, as @xiaochengh said, this is incorrect. Tree-scoped-ness is just about how the names and references work with shadow trees, it says nothing about uniqueness. But also, yeah, the behavior for multiple valid anchors with the same name won't actually help you here, since all of the anchors are in scope for all of the tooltips here. > Btw, if you want it anchored to the containing block, isn't it just the good old positioned layout (without anchor())? In theory, tho you'll be limited to what plain positioning can do. At least in this case, putting the abspos "below the element" is easy with a `top: 100%;`, but there might be other things you want to do that require anchor positioning. For example, `top: anchor(bottom); bottom: 0;` would let the box stretch from the bottom of the anchor to the bottom of the screen, and you can't do that here. > We can't use the anchor name on the containing block itself. I forget why this is the case - is it because the positioned element can trigger scrollbars on the containing block, and thus we don't have the "laid out strictly after" condition, @xiaochengh ? > [anchor-scope proposal] I suspect some simple way to say "look for closest ancestor with the given anchor-name" (rather than "last element in the page with the given anchor-name") would address the common case here. Probably can bake it into the `<anchor-element>` grammar, so `anchor-default: closest --tooltip;` or `top: anchor(closest --tooltip);` would work for these cases. -- GitHub Notification of comment by tabatkins Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/9045#issuecomment-1644318366 using your GitHub account -- Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Thursday, 20 July 2023 17:31:29 UTC