From cb1450fc76998426111e150a983deb31ecbe42ce Mon Sep 17 00:00:00 2001 From: Andrew Seguin Date: Wed, 21 Aug 2024 15:07:04 -0600 Subject: [PATCH] fix(multiple): change fallbacks to use m3 (#29528) --- src/material/core/_core.scss | 8 ++++++++ src/material/core/tokens/_token-utils.scss | 6 +----- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/src/material/core/_core.scss b/src/material/core/_core.scss index a71d1e67c67b..acd07c39755d 100644 --- a/src/material/core/_core.scss +++ b/src/material/core/_core.scss @@ -7,6 +7,14 @@ // Mixin that renders all of the core styles that are not theme-dependent. @mixin core() { + // TODO: Move ripple styles to be dynamically loaded instead of in core. + // This variable is used as a fallback for the ripple element's + // background color. However, if it isn't defined anywhere, then MSS + // complains in its verification stage. + html { + --mat-app-on-surface: initial; + } + @include ripple.ripple(); @include cdk.a11y-visually-hidden(); @include cdk.overlay(); diff --git a/src/material/core/tokens/_token-utils.scss b/src/material/core/tokens/_token-utils.scss index 4fbe7df7cca0..a4845610970a 100644 --- a/src/material/core/tokens/_token-utils.scss +++ b/src/material/core/tokens/_token-utils.scss @@ -113,11 +113,7 @@ $_system-fallbacks: m3-tokens.create-system-fallbacks(); @return _create-var($sys-fallback, $fallback); } - // TODO(mat-app-theme): Return the system-level fallback. - // Changing this will affect clients that do not properly call theme mixins since the tokens - // will be undefined and now default to M3 system values, causing a number of screenshot failures. - // @return $sys-fallback; - @return $fallback; + @return $sys-fallback; } // Outputs a map of tokens under a specific prefix.