Skip to content

[selectors] The grammar for :host() and other compound-selector-taking things should probably forbid pseudo-elements #3963

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
emilio opened this issue May 24, 2019 · 0 comments
Labels
selectors-4 Current Work

Comments

@emilio
Copy link
Collaborator

emilio commented May 24, 2019

I just realized that WebKit (but not Blink nor Gecko) parse the following selector as valid:

:host(::before)

(or :host(::before)::before for that matter).

I was going to file a WebKit bug, but then realized that the grammar technically allows it. This also applies to the grammar of :is / :where (old :matches) etc.

I think that's wrong and pseudo-elements should not be allowed in nested selectors. WebKit itself doesn't parse, e.g., :not(::before), so they're not consistent about it.

@emilio emilio changed the title The grammar for :host() and other compound-selector-taking things should forbid pseudo-element [selectors] The grammar for :host() and other compound-selector-taking things should forbid pseudo-element May 24, 2019
@emilio emilio changed the title [selectors] The grammar for :host() and other compound-selector-taking things should forbid pseudo-element [selectors] The grammar for :host() and other compound-selector-taking things should probably forbid pseudo-elements May 24, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
selectors-4 Current Work
Projects
None yet
Development

No branches or pull requests

2 participants