Skip to content

Commit 71a9d88

Browse files
committed
fix(material/schematics): incorrect on-tertiary color being generated (#31061)
Fixes that the `theme-color` schematic was generating the wrong color for `on-tertiary`. Fixes #30603. (cherry picked from commit 6acafed)
1 parent 29f725a commit 71a9d88

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/material/schematics/ng-generate/theme-color/index.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1091,7 +1091,7 @@ html {
10911091
10921092
/* Tertiary palette variables */
10931093
--mat-sys-tertiary: light-dark(#4d1f00, #ffece4);
1094-
--mat-sys-on-tertiary: light-dark(#4d1f00, #ffece4);
1094+
--mat-sys-on-tertiary: light-dark(#ffffff, #000000);
10951095
--mat-sys-tertiary-container: light-dark(#7a3500, #ffb184);
10961096
--mat-sys-on-tertiary-container: light-dark(#ffffff, #190600);
10971097
--mat-sys-tertiary-fixed: light-dark(#7a3500, #ffdbc9);

src/material/schematics/ng-generate/theme-color/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -531,8 +531,8 @@ function getColorSysVariablesCSS(
531531
css += createLightDarkVar(
532532
leftSpacing,
533533
'on-tertiary',
534-
isHighContrast ? lightScheme.tertiary : lightScheme.tertiaryPalette.tone(100),
535-
isHighContrast ? darkScheme.tertiary : darkScheme.tertiaryPalette.tone(20),
534+
isHighContrast ? lightScheme.onTertiary : lightScheme.tertiaryPalette.tone(100),
535+
isHighContrast ? darkScheme.onTertiary : darkScheme.tertiaryPalette.tone(20),
536536
);
537537
css += createLightDarkVar(
538538
leftSpacing,

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy