[csswg-drafts] [css-selectors-4] Syntax order of `<pseudo-compound-selectors>` (#10165)

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

== [css-selectors-4] Syntax order of `<pseudo-compound-selectors>` ==
Currently the syntax for `pseudo-compound-selectors` is defined as:
https://github.com/w3c/csswg-drafts/blob/c63d0036cca408ff4deb7589c22397f4d6d99e04/selectors-4/Overview.bs#L3602

However, according to the following note, pseudo-elements rarely follow pseudo-classes and the inverse is more often true.

[In general, a [<pseudo-element-selector>](https://drafts.csswg.org/selectors/#typedef-pseudo-element-selector) is only valid if placed at the end of the last [<compound-selector>](https://drafts.csswg.org/selectors/#typedef-compound-selector) in a [<complex-selector>](https://drafts.csswg.org/selectors/#typedef-complex-selector). In some circumstances, however, it can be followed by more <pseudo-element-selector>s or [<pseudo-class-selector>](https://drafts.csswg.org/selectors/#typedef-pseudo-class-selector)s; but these are specified on a case-by-case basis. (For example, the [user action pseudo-classes](https://drafts.csswg.org/selectors/#user-action-pseudo-class) are allowed after any [pseudo-element](https://drafts.csswg.org/selectors/#pseudo-element), and the [tree-abiding pseudo-elements](https://drafts.csswg.org/css-pseudo-4/#tree-abiding) are allowed after the [::slotted()](https://drafts.csswg.org/css-scoping-1/#selectordef-slotted) pseudo-element.)](https://github.com/w3c/csswg-drafts/blob/c63d0036cca408ff4deb7589c22397f4d6d99e04/selectors-4/Overview.bs#L3673-L3682)

Shouldn't the syntax of `pseudo-compound-selectors` be changed to reflect this?  Or, should the syntax be changed to use `&&` combinator to denote that they may appear in any order?

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


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

Received on Monday, 1 April 2024 15:53:33 UTC