[csswg-drafts] [css-anchor-1] Can't anchor one popover to another (#8165)

xiaochengh has just created a new issue for https://github.com/w3c/csswg-drafts:

== [css-anchor-1] Can't anchor one popover to another ==
Right now we can't anchor one [popover](https://github.com/whatwg/html/pull/8221) to another, because:
- Popovers are in the document's [top layer](https://fullscreen.spec.whatwg.org/#top-layer), which means they are absolutely positioned with either viewport or ICB as the containing block
- Then none of them can be an [acceptable anchor](https://drafts4.csswg.org/css-anchor-1/#acceptable-anchor-element) for another

This means we can't support some very important use cases like nested popover menus.

Not sure exactly which spec to fix (top level, popover or CSS anchor). One possible idea to fix it in CSS is: maybe we can take tree ordering into consideration? If two abspos elements are in the same containing block, the second can anchor to the first.

cc @mfreed7 


Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/8165 using your GitHub account


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

Received on Wednesday, 30 November 2022 18:57:07 UTC