Skip to content

[css-pseudo] ::file-selector-button as a CSSPseudoElement #14547

Open

Description

@vmpstr

In #12251 we made the ::file-selector-button be a tree-abiding pseudo element, which previously was an element-backed pseudo element.

CSSPseudoElement says that it represents any tree-abiding pseudo element that isn't element-backed.

Combining the two, it means that ::file-selector-button should be representable as a CSSPseudoElement. Now, the problem is that in practice (in at least Blink), ::file-selector-button is implemented as a shadow tree with a different element backing it, so it's technically implemented as element backed and exposing it as CSSPseudoElement seems potentially problematic. That is, you'd have some indirect reference to a UA tree scope element. Right now, there's a limited number of things you can do with that, but it's still different from most other tree-abiding non-element backed pseudos. (Again, in Blink, ::placeholder also has the same problem)

I'd like to discuss. I personally would say that ::file-selector-button should be element backed, but (IIUC) that causes interop problems. It's just the CSSPseudoElement adds a layer of complexity here if we want to support ::file-selector-button as tree-abiding non-element backed. Either that, or we special case it as not being supported in CSSPseudoElement.

Activity

  1. moved this to TPAC/FTF agenda items in CSSWG agenda TPAC 2026on Oct 21, 2026
  2. moved this from TPAC/FTF agenda items to Friday Morning in CSSWG agenda TPAC 2026on Oct 21, 2026
  3. moved this from Friday Morning to Not this meeting in CSSWG agenda TPAC 2026on Oct 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions