Skip to content

Commit 67e91a3

Browse files
crisbetoandrewseguin
authored andcommitted
fix(autocomplete): don't darken select option (#6425)
Scopes the darkening of selected options only to `md-select`. Fixes #6407.
1 parent b5f4caf commit 67e91a3

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

src/lib/core/option/_option-theme.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030

3131
// In multiple mode there is a checkbox to show that the option is selected.
3232
&.mat-selected:not(.mat-option-multiple) {
33-
background: mat-color($background, hover, 0.12);
33+
background: mat-color($background, hover);
3434
}
3535

3636
&.mat-active {

src/lib/select/_select-theme.scss

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,12 @@
5252
color: mat-color($foreground, text);
5353
}
5454

55+
.mat-select-panel {
56+
.mat-option.mat-selected:not(.mat-option-multiple) {
57+
background: mat-color($background, hover, 0.12);
58+
}
59+
}
60+
5561
.mat-select:focus:not(.mat-select-disabled) {
5662
&.mat-primary {
5763
@include _mat-select-inner-content-theme($primary);

0 commit comments

Comments
 (0)