Skip to content

Commit

Permalink
fix(select,input): inconsistent disabled text color
Browse files Browse the repository at this point in the history
Fixes the select and input having different disabled text colors and not taking colors from the palettes.

Fixes #7793.
  • Loading branch information
crisbeto committed Dec 1, 2017
1 parent 53c94c7 commit 1165d67
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 17 deletions.
3 changes: 1 addition & 2 deletions src/lib/input/_input-theme.scss
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,9 @@

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

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

.mat-input-element {
Expand Down
28 changes: 13 additions & 15 deletions src/lib/select/_select-theme.scss
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,6 @@
$primary: map-get($theme, primary);
$accent: map-get($theme, accent);
$warn: map-get($theme, warn);
$is-dark-theme: map-get($theme, is-dark);

.mat-select-disabled .mat-select-value,
.mat-select-arrow {
color: mat-color($foreground, secondary-text);
}

.mat-select-content, .mat-select-panel-done-animating {
background: mat-color($background, card);
Expand All @@ -25,6 +19,18 @@
color: mat-color($foreground, text);
}

.mat-select-placeholder {
color: _mat-control-placeholder-color($theme);
}

.mat-select-disabled .mat-select-value {
color: mat-color($foreground, disabled-text);
}

.mat-select-arrow {
color: mat-color($foreground, secondary-text);
}

.mat-select-panel {
.mat-option.mat-selected:not(.mat-option-multiple) {
background: mat-color($background, hover, 0.12);
Expand All @@ -51,17 +57,9 @@
}

.mat-select.mat-select-disabled .mat-select-arrow {
color: mat-color($foreground, secondary-text);
color: mat-color($foreground, disabled-text);
}
}

.mat-select.mat-select-disabled .mat-select-arrow {
color: mat-color($warn);
}

.mat-select-placeholder {
color: _mat-control-placeholder-color($theme);
}
}

@mixin mat-select-typography($config) {
Expand Down

0 comments on commit 1165d67

Please sign in to comment.