Skip to content

Valid Angular class binding not recognized #15616

@JoepKockelkorn

Description

@JoepKockelkorn

What version of Tailwind CSS are you using?

v4.0.0-beta.9

What build tool (or framework if it abstracts the build tool) are you using?

Angular v19, using the @angular-devkit/build-angular:application builder, which uses PostCSS under the hood

What version of Node.js are you using?

v22.12.0

What browser are you using?

Brave v1.73.105

What operating system are you using?

macOS 15.2 (24C101)

Reproduction URL

https://github.com/JoepKockelkorn/tailwindcss-v4-beta-angular-class-bug

Describe your issue

If I use valid Angular class binding syntax to dynamically add a class in the following way, it is not recognized by tailwind:

<div [class.bg-red-500]="showRedBackground">This should have a red background</div>

There are workarounds, like using [class]="{ 'bg-red-500': showRedBackground }", but ideally all valid Angular syntax which uses valid static tailwind syntax should work.

Metadata

Metadata

Assignees

No one assigned

    Labels

    oxideIssues affecting file parsing

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions