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

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

== are rules for which pseudo-classes and pseudo-elements work after ::part() parse-time or match-time? ==
When I read [the spec](https://drafts.csswg.org/css-shadow-parts-1/#part) 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](https://wpt.fyi/results/css/css-shadow-parts/pseudo-classes-after-part.html) to WPT (see also [the results from the PR](https://wpt.fyi/results/css/css-shadow-parts/pseudo-classes-after-part.html?label=pr_head&max-count=1&pr=47795) if the main results haven't populated yet) 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?

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


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

Received on Tuesday, 27 August 2024 00:56:00 UTC