From ac9c090c6efdc313f2220f89e6a55f4ec1d5b68e Mon Sep 17 00:00:00 2001 From: Andrew Seguin Date: Fri, 10 Feb 2017 14:25:14 -0800 Subject: [PATCH] fix(select): set select value to trigger height and center text (#3021) * fix(select): change styling to always center select value text * move border to its own div; make value ellipsis * add more room for arrow, account for margin * minor fixes --- src/lib/select/_select-theme.scss | 15 ++++++++--- src/lib/select/select.html | 5 +++- src/lib/select/select.scss | 42 ++++++++++++++++++++++--------- 3 files changed, 46 insertions(+), 16 deletions(-) diff --git a/src/lib/select/_select-theme.scss b/src/lib/select/_select-theme.scss index 5cc54c91fe63..3b009f5306ba 100644 --- a/src/lib/select/_select-theme.scss +++ b/src/lib/select/_select-theme.scss @@ -9,16 +9,25 @@ .mat-select-trigger { color: mat-color($foreground, hint-text); - border-bottom: 1px solid mat-color($foreground, divider); .mat-select:focus:not(.mat-select-disabled) & { color: mat-color($primary); - border-bottom: 1px solid mat-color($primary); } .mat-select.ng-invalid.ng-touched:not(.mat-select-disabled) & { color: mat-color($warn); - border-bottom: 1px solid mat-color($warn); + } + } + + .mat-select-underline { + background-color: mat-color($foreground, divider); + + .mat-select:focus:not(.mat-select-disabled) & { + background-color: mat-color($primary); + } + + .mat-select.ng-invalid.ng-touched:not(.mat-select-disabled) & { + background-color: mat-color($warn); } } diff --git a/src/lib/select/select.html b/src/lib/select/select.html index ca7ae280db9f..4e36b2187800 100644 --- a/src/lib/select/select.html +++ b/src/lib/select/select.html @@ -1,8 +1,11 @@
{{ placeholder }} - {{ selected?.viewValue }} + + {{ selected?.viewValue }} + +