Skip to content

Commit ba7be78

Browse files
committed
fix(select,input): inconsistent disabled text color
Fixes the select and input having different disabled text colors and not taking colors from the palettes. Fixes #7793.
1 parent 9673f63 commit ba7be78

File tree

2 files changed

+10
-13
lines changed

2 files changed

+10
-13
lines changed

src/lib/input/_input-theme.scss

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,9 @@
66

77
@mixin mat-input-theme($theme) {
88
$foreground: map-get($theme, foreground);
9-
$is-dark-theme: map-get($theme, is-dark);
109

1110
.mat-input-element:disabled {
12-
color: mat-color($foreground, secondary-text, if($is-dark-theme, 0.7, 0.42));
11+
color: mat-color($foreground, disabled-text);
1312
}
1413
}
1514

src/lib/select/_select-theme.scss

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,6 @@
1010
$primary: map-get($theme, primary);
1111
$accent: map-get($theme, accent);
1212
$warn: map-get($theme, warn);
13-
$is-dark-theme: map-get($theme, is-dark);
14-
15-
.mat-select-disabled .mat-select-value,
16-
.mat-select-arrow {
17-
color: mat-color($foreground, secondary-text);
18-
}
1913

2014
.mat-select-content, .mat-select-panel-done-animating {
2115
background: mat-color($background, card);
@@ -25,6 +19,14 @@
2519
color: mat-color($foreground, text);
2620
}
2721

22+
.mat-select-disabled .mat-select-value {
23+
color: mat-color($foreground, disabled-text);
24+
}
25+
26+
.mat-select-arrow {
27+
color: mat-color($foreground, secondary-text);
28+
}
29+
2830
.mat-select-panel {
2931
.mat-option.mat-selected:not(.mat-option-multiple) {
3032
background: mat-color($background, hover, 0.12);
@@ -51,13 +53,9 @@
5153
}
5254

5355
.mat-select.mat-select-disabled .mat-select-arrow {
54-
color: mat-color($foreground, secondary-text);
56+
color: mat-color($foreground, disabled-text);
5557
}
5658
}
57-
58-
.mat-select.mat-select-disabled .mat-select-arrow {
59-
color: mat-color($warn);
60-
}
6159
}
6260

6361
@mixin mat-select-typography($config) {

0 commit comments

Comments
 (0)