Skip to content

[css-anchor-position-1] ::placeholder being an acceptable anchor exposes UA implementation details #12949

@dshin-moz

Description

@dshin-moz

We're allowing any tree-abiding pseudo-element to be an acceptable anchor. This includes ::placeholder.

However, this exposes an implementation details of <input type=text> - Namely, what happens when the user starts typing into the textbox? Do UAs need to behave as if the box went away? Spec defines ::placeholder loosely enough that ::placeholder having a box while the text is not being shown is fine:

There also exists a :placeholder-shown pseudo-class, which applies to (real) elements while they are showing placeholder text, [...]. ::placeholder specifically represents the placeholder text [...]

position-visibility: anchors-visible being a default value dampens the impact, but anchors-valid would expose implementation details.

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