Skip to content

Source classes are not detected correctly when specified as data-loading="addClass(opacity-50)" #19458

@gremo

Description

@gremo

What version of Tailwind CSS are you using?

v4.1.18

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

https://github.com/SymfonyCasts/tailwind-bundle

What version of Node.js are you using?

N/A

What browser are you using?

Chrome

What operating system are you using?

Windows

Reproduction URL

N/A

Describe your issue

In Symfony live components, usually one defines the data-loading attribute with the addClass directive, like this:

<div data-loading="addClass(opacity-50)">
  <!-- -->
</div>

The source analysis mechanism for extracting CSS classes fails in this case, and the opacity-50 class is not added to the output.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions