[csswg-drafts] [css-anchor-position-1] `::placeholder` being an acceptable anchor exposes UA implementation details (#12949)

dshin-moz has just created a new issue for https://github.com/w3c/csswg-drafts:

== [css-anchor-position-1] `::placeholder` being an acceptable anchor exposes UA implementation details ==
We're allowing any tree-abiding pseudo-element to be an [acceptable anchor](https://drafts.csswg.org/css-anchor-position-1/#acceptable-anchor-element). 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](https://drafts.csswg.org/css-pseudo/#placeholder-pseudo) that `::placeholder` having a box while the text is not being shown is fine:

```
> There also exists a [:placeholder-shown](https://drafts.csswg.org/selectors-4/#placeholder-shown-pseudo) pseudo-class, which applies to (real) elements while they are showing placeholder text, [...]. [::placeholder](https://drafts.csswg.org/css-pseudo/#selectordef-placeholder) specifically represents the placeholder text [...]
```

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

Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/12949 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Tuesday, 14 October 2025 16:47:42 UTC