SASS Integration with PostCSS and Tailwind CSS v4 is not working as expected #18715
Replies: 1 comment 1 reply
-
In v4, Tailwind does not use the Also note, as per the documentation:
|
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hello,
I am having trouble configuring a project to work with both SASS and Tailwind CSS v4 using Vite and Laravel. Based on the documentation, it seems the recommended approach of using a dedicated CSS file for Tailwind directives is the way forward, but the integration with an existing SCSS-based workflow is causing issues.
My project has the following setup:
v7.0.6
v12.21.0
v1.90.0
v4.1.11
I followed the new recommended approach of using a plain CSS file for @tailwind directives and then importing it in vite.config.js. However, the custom rules defined in tailwind.config.js (e.g., custom colors or breakpoints) are not being applied, and the SCSS compiler seems to be ignoring the Tailwind directives entirely.
Here is a summary of my configuration files:
vite.config.js
postcss.config.cjs
tailwind.config.js
resources/css/app.css
I believe this may be a conflict between the new Tailwind v4 approach and how Vite and SASS handle their build processes. Any guidance on how to properly integrate these tools would be greatly appreciated. Thank you.
Beta Was this translation helpful? Give feedback.
All reactions