-
-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Tailwind core/reset file added after other css files in astro build #4614
Comments
I think this is related to the general problem of scoped styles being placed before all imported styles, causing imported styles to override them. |
Is this example even using Tailwind? I don't see the usage. |
I guess the reset happens anyways? |
A related issue: #4446 |
Ok, I looked into this a bit. So what is happening here is that you are generating a few bundles but the important ones are:
Both of these bundles are used on all 9 pages. I'm not sure there's really a way for us to determine which of these bundles should go first and which should go last. From Astro's perspective they both seem equally important as they are used just as much. Going to look into a couple of options. |
Ok, I think I have a solution for this based on source order. Need to figure out how to write a test. |
What version of
astro
are you using?1.1.3
Are you using an SSR adapter? If so, which one?
None
What package manager are you using?
yarn
What operating system are you using?
Windows
Describe the Bug
Tailwind CSS files in build are being added last (or second last), causing tailwind reset file to override scoped (in file) CSS.
To replicate...
astro add tailwind
astro build
Link to Minimal Reproducible Example
https://stackblitz.com/edit/github-vymz2e?file=tsconfig.json,astro.config.mjs,tailwind.config.cjs,package.json,src%2Fconfig.ts,src%2Fenv.d.ts,src%2Fpages%2Fblog.astro,src%2Flayouts%2FBlogPost.astro,dist%2Findex.html&on=stackblitz
Participation
The text was updated successfully, but these errors were encountered: