Skip to content

[css-shadow-parts] are rules for which pseudo-classes and pseudo-elements work after ::part() parse-time or match-time? #10786

@dbaron

Description

@dbaron

When I read the spec for ::part(), it describes rules about allowing pseudo-elements and pseudo-classes after ::part() in selectors. Those rules seem to say that all pseudo-classes and pseudo-elements are syntactically allowed, but that some of them never match.

I believe implementations across Chromium, Gecko, and WebKit have instead implemented these restrictions as parse-time restrictions that make the selectors not be syntactically valid. I know this is true in Chromium (I was working on the relevant code today), and I just added a test to WPT that appears to confirm that WebKit and Gecko agree (unless I'm misunderstanding things).

(I plan to open a separate issue, also related to the above test, about the fact that those tests depend on somewhat-vague wording that might be interpreted in different ways; see for example #9795 for previous confusion.)

How intentional was that wording in the spec? Should the spec change? Or is there sufficient justification to attempt to change multiple somewhat-interoperable engines here?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Status

    Friday afternoon

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions