Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(input): baseline alignment on textarea #3714

Merged
merged 2 commits into from
Mar 27, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 10 additions & 2 deletions src/demo-app/baseline/baseline-demo.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,11 @@
<md-radio-button value="option_3">Radio 3</md-radio-button>
| Text 4 |
<md-input-container>
<input mdInput placeholder="Input">
<input mdInput placeholder="Input" value="Text Input">
</md-input-container>
| Text 5 |
<md-input-container>
<textarea mdInput placeholder="Input" mdTextareaAutosize>Textarea&#10;Line 2</textarea>
</md-input-container>
| Text After
</md-card-content>
Expand All @@ -31,7 +35,11 @@ <h1>
<md-radio-button value="option_3">Radio 3</md-radio-button>
| Text 4 |
<md-input-container>
<input mdInput placeholder="Input">
<input mdInput placeholder="Input" value="Text Input">
</md-input-container>
| Text 5 |
<md-input-container>
<textarea mdInput placeholder="Input" mdTextareaAutosize>Textarea&#10;Line 2</textarea>
</md-input-container>
| Text After
</h1>
Expand Down
3 changes: 3 additions & 0 deletions src/lib/input/input-container.scss
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,9 @@ $mat-input-underline-disabled-background-image:
padding: 0;
width: 100%;

// Needed to make last line of the textarea line up with the baseline.
vertical-align: bottom;

.mat-end & {
text-align: right;

Expand Down