Skip to content

[css-anchor-position] Let more pseudo-elements have implicit anchor elements #11792

Closed

Description

Image for: Description

In #10494 we're discussing having ::scroll-marker-group use its originating element as its "implicit anchor element", so as long as you don't override anything you can just immediately use position: absolute; position-area: bottom center; or similar to position the group.

@flackr brought up that it might make sense to extend this to more tree-abiding pseudos, and make them all use their originating element as their implicit anchor element. For example, ::before would default to positioning relative to the element it's generated for.

This sounds like a reasonable idea? It's technically a behavior change, but only with regards to content that is setting the anchor-pos properties on pseudo-elements without setting a position-anchor value. That seems vanishingly unlikely at this point in the feature's life.

Metadata

Image for: Metadata

Metadata

Image for: 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

    Image for: Issue actions