tailwindcss icon indicating copy to clipboard operation
tailwindcss copied to clipboard

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

Open gremo opened this issue 2 months ago • 3 comments

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.

gremo avatar Dec 17 '25 14:12 gremo