Skip to content

[v4] Tailwind CLI high CPU on bad css #15135

Closed as not planned
Closed as not planned
@dotfrag

Description

@dotfrag

What version of Tailwind CSS are you using?

4.0.0-beta.2

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

Tailwind CLI.

What version of Node.js are you using?

v22.11.0

What browser are you using?

Doesn't matter.

What operating system are you using?

Linux.

Reproduction URL

Steps in README.md:

https://github.com/dotfrag/tailwind-issue-repro

Describe your issue

Repro steps in repo README.

With the following CSS:

@import 'tailwindcss';

@theme {
  --font-sans: "Inter";
}

The node process is idling at 0.x CPU.

Then if you introduce bad css:

@import 'tailwindcss';

@theme {
  --font-sans: "Inter", theme('fontFamily.sans');
}

The node process CPU usage skyrockets to 20% causing 70C+ temps.

The CPU usage does not go down when removing the bad code.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions