Skip to content

Utility Classes Not Generated When Number is Followed by an Underscore in v4.0.10 #16978

@woohm402

Description

@woohm402

What version of Tailwind CSS are you using?

v4.0.10

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

Vite 6.2.0

What version of Node.js are you using?

v20.18.1

What browser are you using?

Chrome

What operating system are you using?

macOS

Reproduction URL

https://github.com/woohm402/tailwindcss-4.0.10-bug-reproduction-1

npm run dev and then visit http://localhost:5173 will work

Describe your issue

Using the legacy JavaScript config in v4.0.10, the theme font configuration with the name Title1_Strong does not generate a utility class, whereas Title_Strong does. In v4.0.9 and earlier versions, both utility classes were generated properly. The text-Title_Strong utility class is created, but text-Title1_Strong is not.

It appears that any font names following the \d_ pattern do not generate utility classes. However, other patterns such as Title1Strong and Title__Strong work properly.

tailwind config created css
Image Image

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