From 67e91a3934890d682e6e6503383cb52a16270038 Mon Sep 17 00:00:00 2001 From: Kristiyan Kostadinov Date: Tue, 15 Aug 2017 23:48:46 +0200 Subject: [PATCH] fix(autocomplete): don't darken select option (#6425) Scopes the darkening of selected options only to `md-select`. Fixes #6407. --- src/lib/core/option/_option-theme.scss | 2 +- src/lib/select/_select-theme.scss | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/lib/core/option/_option-theme.scss b/src/lib/core/option/_option-theme.scss index 527406222d26..6a2a0fdb2587 100644 --- a/src/lib/core/option/_option-theme.scss +++ b/src/lib/core/option/_option-theme.scss @@ -30,7 +30,7 @@ // In multiple mode there is a checkbox to show that the option is selected. &.mat-selected:not(.mat-option-multiple) { - background: mat-color($background, hover, 0.12); + background: mat-color($background, hover); } &.mat-active { diff --git a/src/lib/select/_select-theme.scss b/src/lib/select/_select-theme.scss index 06ce7a5ffd76..de7432ff3c30 100644 --- a/src/lib/select/_select-theme.scss +++ b/src/lib/select/_select-theme.scss @@ -52,6 +52,12 @@ color: mat-color($foreground, text); } + .mat-select-panel { + .mat-option.mat-selected:not(.mat-option-multiple) { + background: mat-color($background, hover, 0.12); + } + } + .mat-select:focus:not(.mat-select-disabled) { &.mat-primary { @include _mat-select-inner-content-theme($primary);