Skip to content

Cannot disable preflight in TW 4 #550

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
noctivityinc opened this issue May 26, 2025 · 3 comments
Closed

Cannot disable preflight in TW 4 #550

noctivityinc opened this issue May 26, 2025 · 3 comments

Comments

@noctivityinc
Copy link

Im using tailwindcss v4.0.17 with a ruby 3.3.8 app and rails 7.2

I cant use tailwindcss v4.1.17 because it hangs on build.

Anyway, since v4 of TW they removed the tailwind.config.js support, I am having to move to things like this:

@import "tailwindcss" prefix(tw) important;

Which is weird but fine. However, I can't seem to find a command to turn preflight OFF in v4. How would I do that with this gem?

@patriciomacadden
Copy link
Contributor

Hi @noctivityinc , you can turn if off by importing all tailwind parts separately except preflight, a explained in the docs.

@noctivityinc
Copy link
Author

@patriciomacadden close. I played around and got this working with everything:

@layer theme, base, components, utilities;
@import "tailwindcss/theme.css" layer(theme) prefix(tw) important;
@import "tailwindcss/utilities.css" layer(utilities);

The removal of the config file is definitely causing some head scratching!

@patriciomacadden
Copy link
Contributor

awesome! glad it worked! 😄

And I agree, it was definitively a big change for everyone!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants