From 68e2f46bf7411b225a02d36796e7f829e5f9fa37 Mon Sep 17 00:00:00 2001 From: Paul Gschwendtner Date: Wed, 2 Aug 2017 00:05:27 +0200 Subject: [PATCH] fix(input): underline should only be thicker if focused (#6152) * Currently the underline of the input container is always `2px` thick if the input is invalid. As per specifications the underline should be `1dp/px` if not focused. --- src/lib/input/input-container.scss | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/lib/input/input-container.scss b/src/lib/input/input-container.scss index 95bd0d5cae52..0154daac6635 100644 --- a/src/lib/input/input-container.scss +++ b/src/lib/input/input-container.scss @@ -202,7 +202,7 @@ textarea.mat-input-element { .mat-input-ripple { position: absolute; - height: $mat-input-underline-height * 2; + height: $mat-input-underline-height; top: 0; left: 0; width: 100%; @@ -211,6 +211,10 @@ textarea.mat-input-element { visibility: hidden; transition: background-color $swift-ease-in-duration $swift-ease-in-timing-function; + .mat-focused & { + height: $mat-input-underline-height * 2; + } + .mat-focused &, .mat-input-invalid & { visibility: visible;