Closed
Description
Currently there are various specs that restrict selector arguments to <compound-selector>
for performance reasons. E.g. :host
and :host-context()
.
However, given how <compound-selector>
is defined, 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