-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
*.mdx loaded from /content does not support CSS #6434
Comments
Thanks, taking a look. |
With content collections you really do need to have a We might wind up creating a |
Sorry for missing the <html> part, I fixed the stackblitz demo, now the issue might be clearer: Apparently rendering in the root Astro component yields different output compared to rendering in a child Astro component. (leading to the missing style, as initially stated) |
That's helpful, thanks I'll dig into this, then. |
This seems to be a duplicate of #7761 so I'm going to track that there. Feel free to chime in on that conversation! |
What version of
astro
are you using?2.0.17
Are you using an SSR adapter? If so, which one?
None
What package manager are you using?
npm
What operating system are you using?
Windows
Describe the Bug
If you define a collection and load mdx files from that collection, every *.astro component that is imported into that mdx file will lose its style.
The repro clearly shows that when I use mdx at page level (
/red
app url), the imported Astro component works fine and the text becomes red, but when I choose the defineCollection way and render the mdx file as a component, the style is gone (/not-red
app url). It is the same behavior for when I import the css class in the inner Astro component. (/not-red-2
app url)Link to Minimal Reproducible Example
https://stackblitz.com/edit/astro-ujjlyg
Participation
The text was updated successfully, but these errors were encountered: