lambda-packages
lambda-packages copied to clipboard
BUG: TailwindCSS + Svelte: Hot Reload shows erratic behavior
What version of astro are you using?
v1.1.6
Are you using an SSR adapter? If so, which one?
None
What package manager are you using?
npm
What operating system are you using?
Win 11 Enterprise (10.0.22000 Build 22000)
Describe the Bug
Tailwind Classes added to HTML-Elements are being ignored or are applied erratically (once Svelte is integrated)
Here are a few things I observed (I used an H1 with the class text-*xl in both, a Svelte component and .astro page):
- When changing
text-*xland going up in sizes, it often works fortext-2xl,text-3xletc. and up totext-5xl, then it stops working and jumps back to no styling (even though we now have something liketext-6xlapplied.) - Problem seems to be related to the Svelte integration. When Svelte is integrated
.astrofiles show an erratic behavior too. - Restarting the dev-server "fixes" the problem (e.g classes are applied as they should).
- When a class was added successfully once (by restarting the dev-server) it seems to work after that.
Thanks for reading!
Link to Minimal Reproducible Example
https://stackblitz.com/edit/github-xtuihr?file=src%2Fpages%2Findex.astro,src%2FTest.svelte&on=stackblitz
Participation
- [ ] I am willing to submit a pull request for this issue.