[csswg-drafts] [css-anchor-position] `position-visibility: no-overflow` does not support Top Layers elements (#10454)

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

== [css-anchor-position] `position-visibility: no-overflow` does not support Top Layers elements ==
According to the specification, the anchor element is "clipping", if anchor’s ink overflow rectangle is fully clipped by an element which is an ancestor of anchor but a descendant of abspos’s containing block.

If the anchor element is in the top layer (such as a Popover), then the block containing it is the `viewport`.

As a result, the anchor element  is in the top layer overflowed the container when the `position-visibility: no-overflow` property is set.

When the anchor element is a simple `<div></div>` element (can be seen by removing the `popover="auto"` attribute), the element is clipped correctly

Example of this case: https://codepen.io/pont1s/pen/zYQdPoo (Chrome >= 125)

I think this is a common use case, is there any way to implement the expected behavior?

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


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

Received on Monday, 17 June 2024 11:41:59 UTC