Skip to content

Commit

Permalink
fix(input): underline showing at end if text-align is set (#5280)
Browse files Browse the repository at this point in the history
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
  • Loading branch information
devversion authored and jelbourn committed Jun 22, 2017
1 parent 51bf26e commit 5c9391d
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/lib/input/input-container.scss
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 5c9391d

Please sign in to comment.