From 5c9391df748830a36229647521b74093f741e963 Mon Sep 17 00:00:00 2001 From: Paul Gschwendtner Date: Fri, 23 Jun 2017 00:28:21 +0200 Subject: [PATCH] fix(input): underline showing at end if text-align is set (#5280) Recently the `align` input binding has been removed in favor of the CSS property `text-align`. If a developer sets the `text-align` property to `end` the text will start from the end and also the input underline will show incorrectly start from the end. Setting the absolute positioned underline to `left: 0` ensures that the underline always shows-up correctly (because the `mat-input-underline` is inside of a relative container) Fixes #5272 --- src/lib/input/input-container.scss | 1 + 1 file changed, 1 insertion(+) diff --git a/src/lib/input/input-container.scss b/src/lib/input/input-container.scss index 3d36c8d3c320..f1e974f77607 100644 --- a/src/lib/input/input-container.scss +++ b/src/lib/input/input-container.scss @@ -206,6 +206,7 @@ textarea.mat-input-element { position: absolute; height: $mat-input-underline-height * 2; top: 0; + left: 0; width: 100%; transform-origin: 50%; transform: scaleX(0.5);