Skip to content

[Bug]: Tailwind preset content paths not applied causing missing utilities (e.g. md:flex) #801

Description

@nickdekesel

Contact Details

nk@xbuild.com

Detailed description

Describe the bug
In one self-contained system, Tailwind does generate breakpoint utilities such as md:flex.
In another self-contained system (same setup), Tailwind does not generate these utilities - resulting in classes like hidden md:flex staying display: none at all breakpoints.

It only works if the same class also appears in another location like somewhere in account-management
Once that duplicate usage is removed, Tailwind stops generating the utility entirely.

This means the preset content is inconsistently respected depending on the current working directory of the consuming app.

Expected behavior
The content configuration defined in a preset should reliably apply to all self-contained systems that consume the preset - matching the behavior described in the Tailwind documentation.

Additional context

  • Adding a content array inside the self-contained system's own tailwind.config.{js,ts} fixes the issue immediately. This suggests that the preset content paths are not merged or normalized relative to the consuming system, even though the docs state that presets can include content.

  • I also included a video in which you can see we have the utility class in one system (code on the left) which is not applied, but after adding it in another system (code to the right) the tailwind class works correctly.
    https://github.com/user-attachments/assets/28036cc7-e41c-4691-ac59-da2a1d134b2c

Severity

High

Is this bug security related?

  • This bug is related to security

Code of Conduct

  • I agree to follow this project's Code of Conduct

Metadata

Metadata

Assignees

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