@@ -69,8 +69,8 @@ Find and replace all instances of `sp-badge` with `swc-badge` in your templates
6969
7070### CSS custom properties
7171
72- All ` --mod-badge-* ` custom properties have been renamed to ` --swc-badge-* ` . Update any
73- overrides in your stylesheets:
72+ All ` --mod-badge-* ` custom properties have been removed. Replace them with the
73+ ` --swc-badge-* ` equivalents in your stylesheets:
7474
7575| Removed (1st-gen) | Replacement (2nd-gen) |
7676| ------------------------------------------- | ------------------------------ |
@@ -99,6 +99,30 @@ swc-badge {
9999}
100100```
101101
102+ > ** Note on per-variant color overrides:** Semantic variants (` neutral ` , ` informative ` ,
103+ > ` positive ` , ` negative ` , ` notice ` , ` accent ` ) use attribute-based selectors internally,
104+ > so consumer per-variant overrides work as expected:
105+ >
106+ > ``` css
107+ > swc-badge [variant = ' positive' ] {
108+ > --swc-badge-background-color : darkgreen ;
109+ > }
110+ > ```
111+ >
112+ > Non-semantic color variants (`gray`, `red`, `orange`, `yellow`, `chartreuse`, `celery`,
113+ > `green`, `seafoam`, `cyan`, `blue`, `indigo`, `purple`, `fuchsia`, `magenta`, `pink`,
114+ > `turquoise`, `brown`, `cinnamon`, `silver`) are applied via internal class selectors.
115+ > A consumer attribute selector targeting one of these variants will not reliably override
116+ > its color properties — use a global (unscoped) override instead, which will affect all
117+ > variants:
118+ >
119+ > ```css
120+ > /* Works — but applies to all badge instances */
121+ > swc-badge {
122+ > --swc-badge-background-color : rebeccapurple ;
123+ > }
124+ > ```
125+
102126---
103127
104128## New in 2nd-gen
0 commit comments