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
* Specify the strategy used for scoping styles within Astro components. Choose from:
618
-
* - `'where'` - Use `:where` selectors, causing no specifity increase.
619
-
* - `'class'` - Use class-based selectors, causing a +1 specifity increase.
619
+
* - `'where'` - Use `:where` selectors, causing no specifity increase.
620
+
* - `'class'` - Use class-based selectors, causing a +1 specifity increase.
621
+
* - `'attribute'` - Use `data-` attributes, causing no specifity increase.
620
622
*
621
623
* Using `'class'` is helpful when you want to ensure that element selectors within an Astro component override global style defaults (e.g. from a global stylesheet).
622
624
* Using `'where'` gives you more control over specifity, but requires that you use higher-specifity selectors, layers, and other tools to control which selectors are applied.
625
+
* Using `'attribute'` is useful in case there's manipulation of the class attributes, so the styling emitted by Astro doesn't go in conflict with the user's business logic.
0 commit comments