Skip to content

Conversation

crisbeto
Copy link
Member

Currently the HTML parser will stop parsing as soon as it hits an end character in the name of an attribute (e.g. / or >). This ends up being problematic with some third-party packages like Tailwind which uses a wider range of characters for its class names. While the characters are fine when inside the class attribute, our current parser behavior prevents users from setting those classes conditionally through [class.] bindings.

These changes adjust the parser to handle such cases.

Fixes #61671.

Currently the HTML parser will stop parsing as soon as it hits an end character in the name of an attribute (e.g. `/` or `>`). This ends up being problematic with some third-party packages like Tailwind which uses a wider range of characters for its class names. While the characters are fine when inside the `class` attribute, our current parser behavior prevents users from setting those classes conditionally through `[class.]` bindings.

These changes adjust the parser to handle such cases.

Fixes angular#61671.
@crisbeto crisbeto requested a review from devversion July 22, 2025 09:49
@crisbeto crisbeto added action: review The PR is still awaiting reviews from at least one requested reviewer target: patch This PR is targeted for the next patch release labels Jul 22, 2025
@angular-robot angular-robot bot added the area: compiler Issues related to `ngc`, Angular's template compiler label Jul 22, 2025
@ngbot ngbot bot added this to the Backlog milestone Jul 22, 2025
@crisbeto crisbeto added target: minor This PR is targeted for the next minor release and removed target: patch This PR is targeted for the next patch release labels Jul 22, 2025
@crisbeto
Copy link
Member Author

crisbeto commented Jul 22, 2025

Mostly passing TGP. I need to land one fix in a client app first.

@crisbeto crisbeto added action: merge The PR is ready for merge by the caretaker and removed action: review The PR is still awaiting reviews from at least one requested reviewer labels Jul 23, 2025
@kirjs
Copy link
Contributor

kirjs commented Jul 23, 2025

This PR was merged into the repository by commit 7767aa6.

The changes were merged into the following branches: main

@kirjs kirjs closed this in 7767aa6 Jul 23, 2025
@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 Aug 23, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
action: merge The PR is ready for merge by the caretaker area: compiler Issues related to `ngc`, Angular's template compiler target: minor This PR is targeted for the next minor release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

using special tailwind class names with recommended [class] bindings
3 participants