Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[css-anchor-position] Behavior of positioned element when anchor is in top layer #11868

Open
mayank99 opened this issue Mar 9, 2025 · 0 comments

Comments

@mayank99
Copy link

mayank99 commented Mar 9, 2025

What should happen to the position-anchored element when the anchor is in top layer?

A quick test on today's implementation shows that the positioning fails silently when the anchor is in top layer but the positioned element is not already in top layer.

As an example, consider a modal <dialog> or a popover element that's open in the top layer. Now, consider a non top-layer element that's outside this dialog/popover. If I want to anchor this element to something within the dialog/popover, it will not appear in the top layer.

Would it make sense to automatically elevate positioned elements (and pseudo-elements) into the top layer when their anchors are also in the top layer?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant