Skip to content

[v4] Class Detection Bug #15632

@okkdev

Description

@okkdev

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?

Vite v6.0.7

What version of Node.js are you using?

v23.2.0

What browser are you using?

Arc (Chromium)

What operating system are you using?

macOS

Reproduction URL

Describe your issue

Tailwind doesn't detect the class inside this list [class("bg-red-200")] at https://github.com/okkdev/tailwindcss4-class-detection-bug-repro/blob/main/src/main.gleam#L33

It only works if there is a whitespace somewhere inside of the square braces.
As shown here: https://github.com/okkdev/tailwindcss4-class-detection-bug-repro/blob/main/src/main.gleam#L35
and here: https://github.com/okkdev/tailwindcss4-class-detection-bug-repro/blob/main/src/main.gleam#L38

It would be awesome if there was a way to customize the detection to support more languages like Gleam, instead of having to rely on the automatic detection.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions