Skip to content

Commit b3b6fda

Browse files
karammalerba
authored andcommitted
fix(autocomplete): show hover style on selected options (#4724)
1 parent 28c936f commit b3b6fda

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/lib/autocomplete/_autocomplete-theme.scss

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,12 @@
99
color: mat-color($foreground, text);
1010

1111
.mat-option {
12-
&.mat-selected:not(.mat-active) {
12+
// Selected options in autocompletes should not be gray, but we
13+
// only want to override the background for selected options if
14+
// they are *not* in hover or focus state. This change has to be
15+
// made here because base option styles are shared between the
16+
// autocomplete and the select.
17+
&.mat-selected:not(.mat-active):not(:hover) {
1318
background: mat-color($background, card);
1419
color: mat-color($foreground, text);
1520
}

0 commit comments

Comments
 (0)