Skip to content

Style in @apply skipped when proceeded by newline and tabs #19127

@helpimnotdrowning

Description

@helpimnotdrowning

What version of Tailwind CSS are you using?

v4.1.14

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

Using CLI tool

What version of Node.js are you using?

None

What browser are you using?

Firefox 144.0

What operating system are you using?

Debian Linux 13

Reproduction URL

https://play.tailwindcss.com/bbJLZdqPDd?file=css

Describe your issue

When an @apply directive is immediately followed by a newline and tab (@apply\n\t), the entire directive is ignored.

In the Play example,

<body></body>
@import "tailwindcss";

body {
	@apply
	bg-red-500;
}

, the bg-red-500 is completely ignored. Breaking up the @apply, like by adding a comment right after the @apply (@apply /**/) or changing the tab preceding the bg-red-500 with spaces/removing it, will show the color.

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