Thanks to visit codestin.com
Credit goes to github.com

Skip to content

fix(compiler): fix :host parsing in pseudo-selectors #58554

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

Closed
wants to merge 1 commit into from

Conversation

GeorgySerga
Copy link
Contributor

fix several use-cases where :host was used in or around pseudo-selectors

  • :host followed by a comma inside pseudo-selectors
  • :host outside of pseudo-selectors when another :host is present within see tests for examples

PR Checklist

Please check if your PR fulfills the following requirements:

PR Type

What kind of change does this PR introduce?

  • Bugfix

What is the current behavior?

Look for added tests. Mainly

  • :has(:host, .foo) isn't parsed correctly (the comma after foo was recognized as a selector;
  • :host:has(.foo.host) isn't scoped correctly (added [content] scoping).
    Issue Number: 18.2.8 breaks multiple selectors in :not on :host #58226
    Fixing issues outlined in this comment, doesn't solve all of the problems mentioned, splitting PR's as fixes seem not relevant.

What is the new behavior?

Different :host combinations around pseudo-selectors are parsed correctly.

Does this PR introduce a breaking change?

  • Yes
  • No (unless a broken selector is fixed now, so styles would apply)

Other information

This PR doesn't resolve the whole issue, but fixes a set of use-cases.

fix several use-cases where `:host` was used in or around pseudo-selectors
- `:host` followed by a comma inside pseudo-selectors
- `:host` outside of pseudo-selectors when another `:host` is present within
see tests for examples
@pullapprove pullapprove bot requested a review from JoostK November 7, 2024 21:00
@angular-robot angular-robot bot added the area: compiler Issues related to `ngc`, Angular's template compiler label Nov 7, 2024
@ngbot ngbot bot added this to the Backlog milestone Nov 7, 2024
@GeorgySerga
Copy link
Contributor Author

Closing, #58557 builds on changes here

@GeorgySerga GeorgySerga closed this Nov 9, 2024
@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Dec 10, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area: compiler Issues related to `ngc`, Angular's template compiler
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant