-
Notifications
You must be signed in to change notification settings - Fork 719
[selectors-4] Consider disallowing :host, :host(), :host-context() inside :has() #7212
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
Labels
selectors-4
Current Work
Comments
The CSS Working Group just discussed
The full IRC log of that discussion |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The only meaningful usage of
:host
inside:has()
is using it with:scope
..b:has(:host .a :scope .c) { color: green }
In the above example, the
:scope
inside the:has()
matches the subject element of the style rule according to the current relative selector absolutizing specBut as pointed in some other issues (issue 6399, issue 7211), the above expression has the same problem in the below expression. (increasing invalidation complexity)
.b:has(:is(:host .a :scope) .c) { color: green }
So, it would be better to use below expression instead of the above.
:host .a .b:has(.c) { color: green }
How about disallowing
:host
,:host()
,:host-context()
inside:has()
to avoid increasing complexity?The text was updated successfully, but these errors were encountered: