Skip to content

Commit 577d070

Browse files
committed
fix(material/chips): derive surface color from palette
Fixes a hardcoded color in the chips tokens.
1 parent c20bac7 commit 577d070

File tree

1 file changed

+3
-9
lines changed

1 file changed

+3
-9
lines changed

src/material/core/tokens/m2/mdc/_chip.scss

+3-9
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
@use 'sass:map';
33
@use 'sass:meta';
44
@use '../../token-utils';
5-
@use '../../../mdc-helpers/mdc-helpers';
65
@use '../../../style/sass-utils';
76
@use '../../../theming/theming';
87
@use '../../../theming/inspection';
@@ -230,15 +229,10 @@ $prefix: (mdc, chip);
230229
$foreground: if($is-dark, $grey-50, $grey-900);
231230

232231
$surface: inspection.get-theme-color($theme, background, card);
233-
$on-surface: if(
234-
mdc-helpers.variable-safe-contrast-tone($surface, $is-dark) == 'dark',
235-
#000,
236-
#fff
237-
);
238232
$background: if(
239-
meta.type-of($on-surface) == color and meta.type-of($surface) == color,
240-
color.mix($on-surface, $surface, 12%),
241-
$on-surface
233+
meta.type-of($state-layer-color) == color and meta.type-of($surface) == color,
234+
color.mix($state-layer-color, $surface, 12%),
235+
$state-layer-color
242236
);
243237
}
244238
@else {

0 commit comments

Comments
 (0)