mirror of
https://github.com/tailwindlabs/tailwindcss.git
synced 2025-12-08 21:36:08 +00:00
This PR fixes an issue where imports above Tailwind directives didn't get a `layer(…)` argument. Given this CSS: ```css @import "./typography.css"; @tailwind base; @tailwind components; @tailwind utilities; ``` It was migrated to: ```css @import "./typography.css"; @import "tailwindcss"; ``` But to ensure that the typography styles end up in the correct location, it requires the `layer(…)` argument. This PR now migrates the input to: ```css @import "./typography.css" layer(base); @import "tailwindcss"; ``` Test plan: --- Added an integration test where an import receives the `layer(…)`, but an import that eventually contains `@utility` does not receive the `layer(…)` argument. This is necessary otherwise the `@utility` will be nested when we are processing the inlined CSS. Running this on the Commit template, we do have a proper `layer(…)` <img width="585" alt="image" src="https://github.com/user-attachments/assets/538055e6-a9ac-490d-981f-41065a6b59f9">
A utility-first CSS framework for rapidly building custom user interfaces.
Documentation
For full documentation, visit tailwindcss.com.
Community
For help, discussion about best practices, or any other conversation that would benefit from being searchable:
Discuss Tailwind CSS on GitHub
For chatting with others using the framework:
Join the Tailwind CSS Discord Server
Contributing
If you're interested in contributing to Tailwind CSS, please read our contributing docs before submitting a pull request.