Skip to content

@theme directives ignored by tailwindcss cli -i when imported via @import #18978

@jeff-computers

Description

@jeff-computers

What version of Tailwind CSS are you using?

v4.1.13

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

"@tailwindcss/cli": "^4.1.13",

What version of Node.js are you using?

v22

What browser are you using?

N/A

What operating system are you using?

macOS

Reproduction URL

Incredibly easy to reproduce: https://github.com/jeff-computers/tailwind-import-bug-repro

Describe your issue
Using tailwindcss to generate built files - you cannot use @import syntax to import css files using @theme directives.

  • If an @theme directive is declared in a css file @import(ed) into the input for tailwindcss -i - then the @theme declaration is not included in the output:
Image
  • If the file declaring the @theme directive is used as the 'input' for tailwindcss -i then the built file is copied directly and missing the /*! tailwindcss v4.1.13 | MIT License | https://tailwindcss.com */ comment - which suggests something is being skipped
Image

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