You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
astro with tailwind incorrect style css order in subpath #5676
Hello @matthewp I just updated to latest astro 2.0.2 and netlify adapter and now it happen on both local and netlify deployment.
It happens on both SSG and SSR mode
Hello @matthewp I just updated to latest astro 2.0.2 and netlify adapter and now it happen on both local and netlify deployment. It happens on both SSG and SSR mode
The 2 pages use same BaseLayout with global style on h1. There is only <h1>TEST</h1> in BaseLayout
There is a MarkdownPostLayout that import BaseLayout
I noticed the bug happen when I'm fetching posts in /pages/test/index.astro:
with const allPosts = await Astro.glob("../posts/*.md");
if I remove this line, H1 is displayed correctly.
Edit:
1- It happen only when I deploy on netlify or deploying with deno! Local dev (astro dev) is correct
2- It happen with SSR or SSG
3- I have to put !important rules on global css to make it work, that's not recommended I think
Activity
herve-ch commentedon Jan 7, 2023
updated to astro 1.9.1 and still the same problem, am I missing something?
matthewp commentedon Jan 27, 2023
Sorry for not responding earlier, we were busy with 2.0 issues. I'm taking a look at this now.
matthewp commentedon Jan 27, 2023
I would think that this issue shouldn't require an SSR adapter, right? Does this not happen with SSG mode @herve-ch ?
herve-ch commentedon Jan 28, 2023
Hello @matthewp I just updated to latest astro 2.0.2 and netlify adapter and now it happen on both local and netlify deployment.
It happens on both SSG and SSR mode
https://verdant-kashata-5415d3.netlify.app/test/ <-- Tailwind global css are overriden
https://verdant-kashata-5415d3.netlify.app/
Thanks for your awesome work
JerryWu1234 commentedon Jan 31, 2023
You meant that the below code didn't run in the test folder. Right?
I only have seen different CSS.
herve-ch commentedon Jan 31, 2023
I'm sorry my sample was not correct. I corrected it and I'm using a BaseLayout.
https://verdant-kashata-5415d3.netlify.app/ --> H1 appear correctly
https://verdant-kashata-5415d3.netlify.app/test/ -->H1 doesn't get styled with the same global style
The 2 pages use same BaseLayout with global style on h1. There is only
<h1>TEST</h1>in BaseLayoutThere is a MarkdownPostLayout that import BaseLayout
I noticed the bug happen when I'm fetching posts in /pages/test/index.astro:
with
const allPosts = await Astro.glob("../posts/*.md");if I remove this line, H1 is displayed correctly.
Edit:
1- It happen only when I deploy on netlify or deploying with deno! Local dev (astro dev) is correct
2- It happen with SSR or SSG
3- I have to put !important rules on global css to make it work, that's not recommended I think
Thanks @matthewp @wulinsheng123
JerryWu1234 commentedon Feb 1, 2023
I got it.

the same problem that is the CSS order.
matthewp commentedon Feb 2, 2023
Thanks! Taking a look tomorrow.
matthewp commentedon Feb 8, 2023
Got a fix, just need to figure out how to test this scenario.
matthewp commentedon Feb 8, 2023
Fix is in #6176