Skip to content

Commit b51032a

Browse files
committed
fix(material/stepper): ensure sufficient contrast of step icon
1 parent 357cfd3 commit b51032a

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/material/stepper/_m2-stepper.scss

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,9 @@ $prefix: (mat, stepper);
1818

1919
// Tokens that can be configured through Angular Material's color theming API.
2020
@function get-color-tokens($theme) {
21+
$is-dark: inspection.get-theme-type($theme) == dark;
22+
$header-icon-foreground-color: if($is-dark, black, white);
23+
2124
@return map.merge(private-get-color-palette-color-tokens($theme, primary), (
2225
container-color: inspection.get-theme-color($theme, background, card),
2326
line-color: inspection.get-theme-color($theme, foreground, divider),
@@ -29,6 +32,7 @@ $prefix: (mat, stepper);
2932
header-selected-state-label-text-color: inspection.get-theme-color($theme, foreground, text),
3033
header-error-state-label-text-color: inspection.get-theme-color($theme, warn, text),
3134
header-icon-background-color: inspection.get-theme-color($theme, foreground, secondary-text),
35+
header-icon-foreground-color: $header-icon-foreground-color,
3236
header-error-state-icon-foreground-color: inspection.get-theme-color($theme, warn, text),
3337
header-error-state-icon-background-color: transparent,
3438
));
@@ -71,7 +75,6 @@ $prefix: (mat, stepper);
7175
$active-state-background: inspection.get-theme-color($theme, $palette-name);
7276

7377
@return (
74-
header-icon-foreground-color: $active-state-foreground,
7578
header-selected-state-icon-background-color: $active-state-background,
7679
header-selected-state-icon-foreground-color: $active-state-foreground,
7780
header-done-state-icon-background-color: $active-state-background,

0 commit comments

Comments
 (0)