Skip to content

Tailwind CSS v4 generates inconsistent / invalid utility output in certain environments #20083

Description

@mansoor200x

Describe the issue

I’m running into an issue where Tailwind CSS v4 either:

fails to generate expected utilities,
generates incomplete CSS,
or outputs inconsistent styles depending on the environment/build setup.

The issue appears intermittently across different setups (Vite, PostCSS, monorepos, Docker, etc.), which makes debugging difficult.

In some cases:

certain utilities are ignored entirely,
only partial styles apply,
or the generated CSS output becomes invalid/incomplete.
Reproduction

Minimal reproduction:

Tailwind CSS v4
Vite / React / TypeScript setup
Standard installation flow from the docs

Observed behaviour:

Some classes compile correctly
Others silently fail or do not appear in output CSS
Restarting the dev server sometimes changes the behaviour
Expected behaviour

Tailwind should consistently generate all valid utilities regardless of environment or filesystem structure.

Additional context

I’ve tested:

clearing caches,
reinstalling node_modules,
fresh project setup,
switching between PostCSS and Vite plugins,
updating Node.js,
checking content paths/globs,
monorepo vs standalone setups.

The behaviour still persists.

This may be related to:

file scanning/content detection,
v4 source resolution,
watcher behaviour,
or environment-specific caching.

Would appreciate clarification on whether this is:

a known v4 regression,
expected behaviour,
or a configuration issue that needs additional documentation.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    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