From ed887deaf4ff3a37adeeb72a02ad3e986ebccdd7 Mon Sep 17 00:00:00 2001 From: Daniel Kimmich Date: Thu, 16 Apr 2026 15:56:45 +0200 Subject: [PATCH] fix(material/stepper): ensure sufficient contrast of step icon in M2 Currently, the step icon M2 theming does not work correctly. The foreground color uses the contrast color of the primary color, but this does not necessarily provide enough contrast to the background. With this changes, the default foreground color is adjusted to ensure sufficient contrast to the background, regardless of the primary contrast color. --- src/material/stepper/_m2-stepper.scss | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/material/stepper/_m2-stepper.scss b/src/material/stepper/_m2-stepper.scss index c2fb62f9faff..be03736dec71 100644 --- a/src/material/stepper/_m2-stepper.scss +++ b/src/material/stepper/_m2-stepper.scss @@ -23,6 +23,7 @@ stepper-header-optional-label-text-color: map.get($system, on-surface-variant), stepper-header-selected-state-label-text-color: map.get($system, on-surface), stepper-header-error-state-label-text-color: map.get($system, error), + stepper-header-icon-foreground-color: map.get($system, surface), stepper-header-icon-background-color: map.get($system, on-surface-variant), stepper-header-error-state-icon-foreground-color: map.get($system, error), stepper-header-error-state-icon-background-color: transparent) @@ -54,7 +55,6 @@ $system: m3-utils.replace-colors-with-variant($system, primary, $color-variant); @return ( - stepper-header-icon-foreground-color: map.get($system, on-primary), stepper-header-selected-state-icon-background-color: map.get($system, primary), stepper-header-selected-state-icon-foreground-color: map.get($system, on-primary), stepper-header-done-state-icon-background-color: map.get($system, primary),