- From: Lea Verou via GitHub <sysbot+gh@w3.org>
- Date: Sun, 17 Oct 2021 17:54:11 +0000
- To: public-css-archive@w3.org
LeaVerou has just created a new issue for https://github.com/w3c/csswg-drafts: == [selectors][Editorial] Are things like :is(.foo *) still a <compound-selector>? == Currently there are various specs that restrict selector arguments to `<compound-selector>` for performance reasons. E.g. [`:host` and `:host-context()`](https://www.w3.org/TR/css-scoping/#host-selector). However, given [how `<compound-selector>` is defined](https://www.w3.org/TR/selectors-4/#typedef-compound-selector), things like `:is(.foo .bar *)` or `:not(.foo .bar *)` still match its grammar: ``` <compound-selector> = [ <type-selector>? <subclass-selector>* [ <pseudo-element-selector> <pseudo-class-selector>* ]* ]! [...] <pseudo-class-selector> = ':' <ident-token> | ':' <function-token> <any-value> ')' ``` So technically, things like `:host-context(:is(.foo .bar *))` should be allowed, even though they currently are not in implementations and I guess should not be. Am I missing something or do these grammars need fixing? Perhaps we need a `<restricted-compound-selector>` or something? cc @tabatkins Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/6737 using your GitHub account -- Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Sunday, 17 October 2021 17:54:12 UTC