Skip to content

Commit 36064e9

Browse files
author
Andrew Seguin
committed
fix(material/select): use system color for arrow
1 parent be48108 commit 36064e9

File tree

2 files changed

+10
-6
lines changed

2 files changed

+10
-6
lines changed

src/material/select/_m2-select.scss

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,9 @@
1414
}
1515

1616
// Tokens that can be configured through Angular Material's color theming API.
17-
@function get-color-tokens($theme, $palette-name: primary) {
17+
@function get-color-tokens($theme, $color-variant) {
1818
$system: m2-utils.get-system($theme);
19+
$system: m3-utils.replace-colors-with-variant($system, primary, $color-variant);
1920
$disabled: m3-utils.color-with-opacity(map.get($system, on-surface), 38%);
2021

2122
@return (
@@ -25,8 +26,8 @@
2526
select-placeholder-text-color: map.get($system, on-surface-variant),
2627
select-enabled-arrow-color: map.get($system, on-surface-variant),
2728
select-disabled-arrow-color: $disabled,
28-
select-focused-arrow-color: inspection.get-theme-color($theme, $palette-name, default, 0.87),
29-
select-invalid-arrow-color: inspection.get-theme-color($theme, warn, default, 0.87),
29+
select-focused-arrow-color: inspection.get-theme-color($theme, primary),
30+
select-invalid-arrow-color: inspection.get-theme-color($theme, error),
3031
);
3132
}
3233

src/material/select/_select-theme.scss

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,14 +30,17 @@
3030
map.get(m3-select.get-tokens($theme, $color-variant), color));
3131
} @else {
3232
@include sass-utils.current-selector-or-root() {
33-
@include token-utils.create-token-values-mixed(m2-select.get-color-tokens($theme));
33+
@include token-utils.create-token-values-mixed(
34+
m2-select.get-color-tokens($theme, primary));
3435

3536
.mat-mdc-form-field.mat-accent {
36-
@include token-utils.create-token-values-mixed(m2-select.get-color-tokens($theme, accent));
37+
@include token-utils.create-token-values-mixed(
38+
m2-select.get-color-tokens($theme, secondary));
3739
}
3840

3941
.mat-mdc-form-field.mat-warn {
40-
@include token-utils.create-token-values-mixed(m2-select.get-color-tokens($theme, warn));
42+
@include token-utils.create-token-values-mixed(
43+
m2-select.get-color-tokens($theme, error));
4144
}
4245
}
4346
}

0 commit comments

Comments
 (0)