Open chrisvaillancourt opened 1 year ago
astro
2.5.7
None
npm
Mac
Firefox
Setting scopedStyleStrategy: 'class' in astro.config.mjs breaks component styles that load styles in a cascade layer.
scopedStyleStrategy: 'class'
astro.config.mjs
This issue only occurs during a production build. Reverting to the default 'where' scope strategy resolves the style issue.
'where'
npm run dev
npm run build && npm run preview
https://stackblitz.com/edit/github-vgh3h3?file=src%2Fcomponents%2FBtn.astro
Sorry for the delay! This seems like a compiler issue because we're not properly handling :where styles. I'm going to move it over to that repo.
:where
What version of
astro
are you using?2.5.7
Are you using an SSR adapter? If so, which one?
None
What package manager are you using?
npm
What operating system are you using?
Mac
What browser are you using?
Firefox
Describe the Bug
Setting
scopedStyleStrategy: 'class'
inastro.config.mjs
breaks component styles that load styles in a cascade layer.This issue only occurs during a production build. Reverting to the default
'where'
scope strategy resolves the style issue.Example button when running
npm run dev
Example button when running
npm run build && npm run preview
To Reproduce
npm run dev
and preview the output buttonnpm run build && npm run preview
and notice the difference in button stylesLink to Minimal Reproducible Example
https://stackblitz.com/edit/github-vgh3h3?file=src%2Fcomponents%2FBtn.astro
Participation