Skip to content

Commit 1165d67

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 53c94c7 commit 1165d67

File tree

2 files changed

+14
-17
lines changed

2 files changed

+14
-17
lines changed

src/lib/input/_input-theme.scss

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

88
@mixin mat-input-theme($theme) {
99
$foreground: map-get($theme, foreground);
10-
$is-dark-theme: map-get($theme, is-dark);
1110

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

1615
.mat-input-element {

src/lib/select/_select-theme.scss

Lines changed: 13 additions & 15 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,18 @@
2519
color: mat-color($foreground, text);
2620
}
2721

22+
.mat-select-placeholder {
23+
color: _mat-control-placeholder-color($theme);
24+
}
25+
26+
.mat-select-disabled .mat-select-value {
27+
color: mat-color($foreground, disabled-text);
28+
}
29+
30+
.mat-select-arrow {
31+
color: mat-color($foreground, secondary-text);
32+
}
33+
2834
.mat-select-panel {
2935
.mat-option.mat-selected:not(.mat-option-multiple) {
3036
background: mat-color($background, hover, 0.12);
@@ -51,17 +57,9 @@
5157
}
5258

5359
.mat-select.mat-select-disabled .mat-select-arrow {
54-
color: mat-color($foreground, secondary-text);
60+
color: mat-color($foreground, disabled-text);
5561
}
5662
}
57-
58-
.mat-select.mat-select-disabled .mat-select-arrow {
59-
color: mat-color($warn);
60-
}
61-
62-
.mat-select-placeholder {
63-
color: _mat-control-placeholder-color($theme);
64-
}
6563
}
6664

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

0 commit comments

Comments
 (0)