-
Notifications
You must be signed in to change notification settings - Fork 27.1k
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
[Bug?]: cssChunking / CSS Optimisations - Module CSS getting reset by tailwind's global styles #69311
Comments
This is related to #64921 |
We cannot easily recreate the issue with the provided information. Please add a minimal reproduction in order for us to be able to help more efficiently. Why was this issue marked with the
|
@rohitpotato If we can get a simpler |
@samcx its a private repo, i cant really share the code. But the above sandbox is as simple as it gets. Please check with this if possible. |
@rohitpotato I'm afraid there is way too much going on in that repository for us to dig into. Ideally, a Are you intermixing Client and Server components? That might be part of the issue. |
This issue has been automatically closed because it received no activity for a month and had no reproduction to investigate. If you think it was closed by accident, please leave a comment. If you are running into a similar issue, please open a new issue with a reproduction. Thank you. |
This closed issue has been automatically locked because it had no new activity for 2 weeks. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you. |
Link to the code that reproduces this issue
https://github.com/GabenGar/repros/blob/main/nextjs/css-out-of-order/README.md
To Reproduce
.module.css
file.Current vs. Expected behavior
Tailwind CSS's preflight styles overwrite Tailwind CSS written inside
module CSS
.Example:
Expected Behaviour: Button color is red.
Current Behaviour: Button color is transparent since module CSS is overwritten by tailwind's preflight styles.
Provide environment information
Which area(s) are affected? (Select all that apply)
Not sure, create-next-app, Navigation
Which stage(s) are affected? (Select all that apply)
next build (local), Other (Deployed)
Additional context
We have a big legacy project where we have written tailwind classes inside module CSS by using the apply directive. At some places, these styles are being reset by Tailwind's preflight styles. This started happening after the next JS upgrade to version 14.2.5 and we are unable to move further.
I have tried the cssChunking as per the documentation but that is having no effect.
Is there any workaround? Rewriting everything back to tailwind classes is a very bandwidth heavy task for our team.
The text was updated successfully, but these errors were encountered: