Skip to content

Commit 1b3e02c

Browse files
committed
fix(autocomplete): show hover style on selected options
1 parent e2f67f5 commit 1b3e02c

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/lib/autocomplete/_autocomplete-theme.scss

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

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

0 commit comments

Comments
 (0)