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 added after my style block clearing all styles #8044
Comments
If anyone wants a quick fix for now I'm using it
in HTML you will need |
Sorry for the frustration! This behavior has switched back and forth and we really need to stabilize this. I'm guessing that this regression was caused by #8011 which switches how we crawl imports to find which styles need to be injected. This likely reverted the crawling order and messed up how styles were being injected during |
|
I traced this to a Vite bug. The import order was not preserved by Vite dev module graph which caused the CSS to be out of order too. vitejs/vite#14465 |
Going to close this for now as the work is done, and the fix is upstream. I'll look into backporting and releasing a patch for Vite 4 perhaps around this week or so. |
What version of
astro
are you using?2.10.7
Are you using an SSR adapter? If so, which one?
Vercel
What package manager are you using?
pnpm
What operating system are you using?
Windows
What browser are you using?
Chrome, Firefox
Describe the Bug
I'm using the tailwind plugin for Astro, after updating Astro to the latest version it started adding a tailwind at the end of the head tag(as shown in the image). This causes any style added above to be reset on tags like
h1 { @apply bg-black }
etc won't work. Downgrading back to the old version 2.0.15 and styles apply fine. Please check stackblitzWhat's the expected result?
Custom styles should be added after the base styles of the tailwind.
Link to Minimal Reproducible Example
https://stackblitz.com/edit/github-vbv2yk
Participation
The text was updated successfully, but these errors were encountered: