3326492b94
* Implement scopedStyleStrategy * Add changeset * Update compiler * Specify the eswalker version * Update compiler * Update .changeset/green-cups-hammer.md Co-authored-by: Emanuele Stoppa <my.burning@gmail.com> * Update .changeset/green-cups-hammer.md Co-authored-by: Emanuele Stoppa <my.burning@gmail.com> * Update packages/astro/src/@types/astro.ts Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca> * Update packages/astro/src/@types/astro.ts Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca> * Update .changeset/green-cups-hammer.md Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca> --------- Co-authored-by: Emanuele Stoppa <my.burning@gmail.com> Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
694 B
694 B
astro |
---|
minor |
Implements a new class-based scoping strategy
This implements the Scoping RFC, providing a way to opt in to increased style specificity for Astro component styles.
This prevents bugs where global styles override Astro component styles due to CSS ordering and the use of element selectors.
To enable class-based scoping, you can set it in your config:
import { defineConfig } from 'astro/config';
export default defineConfig({
scopedStyleStrategy: 'class'
});
Note that the 0-specificity :where
pseudo-selector is still the default strategy. The intent is to change 'class'
to be the default in 3.0.