Global styles from Markdown pages persist when imported to another page #4359
Labels
- P4: important
Violate documented behavior or significantly impacts performance (priority)
feat: markdown
Related to Markdown (scope)
What version of
astro
are you using?1.0.5
Are you using an SSR adapter? If so, which one?
None
What package manager are you using?
pnpm
What operating system are you using?
Mac
Describe the Bug
Say there are two layouts,
MainLayout.astro
andBlogPostLayout.astro
. BlogPostLayout uses a global<style is:global>
to style elements within its markdown children. There are markdown blog posts insrc/pages/blog/*.md
that useBlogPostLayout
.There is a page
src/pages/blog/index.astro
usingMainLayout
that imports markdown blog post files viaAstro.glob("./*.md")
. This page should only have styles from itself andMainLayout
, but instead also has the global styles fromBlogPostLayout
.Sorry if my explanation is unclear, just look at the minimal example.
Link to Minimal Reproducible Example
https://stackblitz.com/edit/github-kq1tg9?file=src%2Fpages%2Findex.astro
Participation
The text was updated successfully, but these errors were encountered: