From 3f344e27b1aea4748cea497b1904b98cf87fb3d9 Mon Sep 17 00:00:00 2001 From: Kara Erickson Date: Mon, 22 May 2017 11:57:42 -0700 Subject: [PATCH] fix(autocomplete): show hover style on selected options --- src/lib/autocomplete/_autocomplete-theme.scss | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/lib/autocomplete/_autocomplete-theme.scss b/src/lib/autocomplete/_autocomplete-theme.scss index 7cce6dfe1c56..86dfde3646d5 100644 --- a/src/lib/autocomplete/_autocomplete-theme.scss +++ b/src/lib/autocomplete/_autocomplete-theme.scss @@ -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); }