mirror of
https://github.com/angular/angular.git
synced 2026-09-14 13:54:52 +08:00
fix(autocomplete): show hover style on selected options (#4724)
This commit is contained in:
@@ -9,7 +9,12 @@
|
||||
color: mat-color($foreground, text);
|
||||
|
||||
.mat-option {
|
||||
&.mat-selected:not(.mat-active) {
|
||||
// Selected options in autocompletes should not be gray, but we
|
||||
// only want to override the background for selected options if
|
||||
// they are *not* in hover or focus state. This change has to be
|
||||
// made here because base option styles are shared between the
|
||||
// autocomplete and the select.
|
||||
&.mat-selected:not(.mat-active):not(:hover) {
|
||||
background: mat-color($background, card);
|
||||
color: mat-color($foreground, text);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user