Skip to content

[css-anchor-position-1] Clarification on pseudo elements having originating element as implicit anchor #12636

@vmpstr

Description

@vmpstr

In Implicit Anchor Elements it says

...
The implicit anchor element of a pseudo-element is its originating element, unless otherwise specified.

Finding an Anchor then says

  1. If anchor spec was not passed, return the default anchor element if it exists, otherwise return nothing.

  2. If anchor spec is auto:

    1. If the Popover API defines an implicit anchor element for query el which is an acceptable anchor element for query el, return that element.
    2. Otherwise, return nothing.

    ...

It seems that given a pseudo element this would return its originating element in step 1 if the default anchor was auto (i.e position-anchor: auto and no anchor spec).

However, if the anchor spec is auto (step 2), then it only returns an implicit anchor for a Popover API and not for pseudo elements, so it would return nothing.

It wasn't clear to me if this is intentional or an oversight.

@tabatkins @fantasai

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions