W3C home > Mailing lists > Public > public-css-archive@w3.org > October 2020

[csswg-drafts] [selectors-4] Text of the "Compound selector" definition misses the Pseudo-elements part (#5676)

From: Ilya Streltsyn via GitHub <sysbot+gh@w3.org>
Date: Wed, 28 Oct 2020 19:39:01 +0000
To: public-css-archive@w3.org
Message-ID: <issues.opened-731736569-1603913940-sysbot+gh@w3.org>
SelenIT has just created a new issue for https://github.com/w3c/csswg-drafts:

== [selectors-4] Text of the "Compound selector" definition misses the Pseudo-elements part ==
Currently, the [formal grammar](https://drafts.csswg.org/selectors-4/#typedef-compound-selector) of the Compound selector is

<compound-selector> = [ <type-selector>? <subclass-selector>*
                        [ <pseudo-element-selector> <pseudo-class-selector>* ]* ]!
i.e. pseudo-elements (possibly pseudo-classed) can be part of Compound selector.

However, [the definition of Compound selector](https://drafts.csswg.org/selectors-4/#compound) in prose states that

> A **compound selector** is a sequence of simple selectors that are not separated by a combinator, and represents a set of simultaneous conditions on a single _element_.

and the formal grammar of the simple selector excluded pseudo-elements (since the resolution of #386). (As a side note, the current formal grammar seems to imply that the "bare" pseudo-element, like `::before`, technically falls under the Compound selector definition.)

Shouldn't the text of the Compound selector definition be amended somehow to make it more clear that pseudo-elements also belong to it?

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

Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Wednesday, 28 October 2020 19:39:04 UTC

This archive was generated by hypermail 2.4.0 : Tuesday, 5 July 2022 06:42:21 UTC