@@ -153,7 +153,7 @@ export const generateCSSVars = (theme: any, prefix: string = CSS_PROPS_PREFIX):
153153 * --ion-color-contrast-rgb: var(--ion-color-primary-contrast-rgb, var(--ion-color-primary-bold-contrast-rgb));
154154 * --ion-color-shade: var(--ion-color-primary-shade, var(--ion-color-primary-bold-shade));
155155 * --ion-color-tint: var(--ion-color-primary-tint, var(--ion-color-primary-bold-tint));
156- * --ion-color-foreground: var(--ion-color-primary, var(--ion-color-primary-foreground, var(--ion-color-primary- bold-foreground) ));
156+ * --ion-color-foreground: var(--ion-color-primary, var(--ion-color-primary-bold-foreground));
157157 *
158158 * --ion-color-subtle-base: var(--ion-color-primary-subtle);
159159 * --ion-color-subtle-base-rgb: var(--ion-color-primary-subtle-rgb);
@@ -188,7 +188,8 @@ export const generateColorClasses = (theme: any): string => {
188188 // Generate CSS variables for bold variant
189189 // Includes base color variables without the bold modifier for
190190 // backwards compatibility. The foreground variables falls back to the
191- // base color because it is new.
191+ // base color because it is new and `--ion-color-${colorName}-foreground`
192+ // has never been used.
192193 // TODO: Remove the fallbacks once the bold variables are the default
193194 if ( colorVariants . bold ) {
194195 cssVariableRules . push (
@@ -198,7 +199,7 @@ export const generateColorClasses = (theme: any): string => {
198199 `--ion-color-contrast-rgb: var(--ion-color-${ colorName } -contrast-rgb, var(--ion-color-${ colorName } -bold-contrast-rgb)) !important;` ,
199200 `--ion-color-shade: var(--ion-color-${ colorName } -shade, var(--ion-color-${ colorName } -bold-shade)) !important;` ,
200201 `--ion-color-tint: var(--ion-color-${ colorName } -tint, var(--ion-color-${ colorName } -bold-tint)) !important;` ,
201- `--ion-color-foreground: var(--ion-color-${ colorName } , var(--ion-color-${ colorName } -foreground, var(--ion-color- ${ colorName } - bold-foreground) )) !important;`
202+ `--ion-color-foreground: var(--ion-color-${ colorName } , var(--ion-color-${ colorName } -bold-foreground)) !important;`
202203 ) ;
203204 }
204205
0 commit comments