Skip to content

Commit 28f2763

Browse files
andrewseguinAndrew Seguin
and
Andrew Seguin
authored
fix(material/core): update tokens to system colors (#31281)
Co-authored-by: Andrew Seguin <andrewseguin@google.com>
1 parent 0f26b91 commit 28f2763

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

src/material/core/option/_m2-option.scss

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,17 +12,18 @@
1212
// Tokens that can be configured through Angular Material's color theming API.
1313
@function get-color-tokens($theme, $color-variant) {
1414
$is-dark: inspection.get-theme-type($theme) == dark;
15-
$active-state-layer-color: inspection.get-theme-color($theme, foreground, base,
16-
if($is-dark, 0.08, 0.04));
1715
$system: m2-utils.get-system($theme);
1816
$system: m3-utils.replace-colors-with-variant($system, primary, $color-variant);
1917

2018
@return (
2119
option-selected-state-label-text-color: map.get($system, primary),
2220
option-label-text-color: inspection.get-theme-color($theme, system, on-surface),
23-
option-hover-state-layer-color: $active-state-layer-color,
24-
option-focus-state-layer-color: $active-state-layer-color,
25-
option-selected-state-layer-color: $active-state-layer-color,
21+
option-hover-state-layer-color: m3-utils.color-with-opacity(
22+
map.get($system, on-surface), map.get($system, hover-state-layer-opacity)),
23+
option-focus-state-layer-color: m3-utils.color-with-opacity(
24+
map.get($system, on-surface), map.get($system, focus-state-layer-opacity)),
25+
option-selected-state-layer-color: m3-utils.color-with-opacity(
26+
map.get($system, on-surface), map.get($system, pressed-state-layer-opacity)),
2627
);
2728
}
2829

0 commit comments

Comments
 (0)