fix(compiler): support one additional level of nesting in :host()#64937
Merged
thePunderWoman merged 1 commit intoangular:mainfrom Nov 6, 2025
Merged
fix(compiler): support one additional level of nesting in :host()#64937thePunderWoman merged 1 commit intoangular:mainfrom
thePunderWoman merged 1 commit intoangular:mainfrom
Conversation
Previously we supported one level of nested parentheses inside of a `:host()` selector, e.g. `:host(:not(p))`. This caused a breakage in g3 when I migrated a selector from `:host:not(:has(p))` to `:host(:not(:has(p)))`. This change adds support for just one more level of nesting. It'd be nice to move everything to a real CSS parser (or even update it to count parentheses like I did with :host-context()), but I wasn't able to get that to work in ~20 minutes and I'm focusing on other things at the moment. This change punts the problem until somebody tries to use just one more level of nesting in a selector. Fixes angular#64830
crisbeto
approved these changes
Nov 6, 2025
Member
Author
|
All failing tests appear to be flakes that TAP hasn't flagged yet: http://test/OCL:828662614:BASE:828981196:1762449004064:76d871a9 |
Contributor
|
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Previously we supported one level of nested parentheses inside of a
:host()selector, e.g.:host(:not(p)). This caused a breakage in g3 when I migrated a selector from:host:not(:has(p))to:host(:not(:has(p))). This change adds support for just one more level of nesting.It'd be nice to move everything to a real CSS parser (or even update it to count parentheses like I did with :host-context()), but I wasn't able to get that to work in ~20 minutes and I'm focusing on other things at the moment.
This change punts the problem until somebody tries to use just one more level of nesting in a selector.
Fixes #64830
Does this PR introduce a breaking change?