Skip to content

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

Open
@mayank99

Description

@mayank99

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?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Status

    Thursday Afternoon

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions