Skip to content

Commit

Permalink
fix(floating-label): Enforce text alignment (#3684)
Browse files Browse the repository at this point in the history
(cherry picked from commit 551e641)
  • Loading branch information
kfranqueiro authored and acdvorak committed Oct 8, 2018
1 parent 17a5828 commit 19d0ca1
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 5 deletions.
4 changes: 4 additions & 0 deletions packages/mdc-floating-label/mdc-floating-label.scss
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@
transform $mdc-floating-label-transition-duration $mdc-animation-standard-curve-timing-function,
color $mdc-floating-label-transition-duration $mdc-animation-standard-curve-timing-function;
line-height: 1.15rem;
text-align: left;
text-overflow: ellipsis;
white-space: nowrap;
cursor: text;
Expand All @@ -60,6 +61,9 @@

/* @noflip */
transform-origin: right top;

/* @noflip */
text-align: right;
}
}

Expand Down
10 changes: 5 additions & 5 deletions test/screenshot/golden.json
Original file line number Diff line number Diff line change
Expand Up @@ -1283,12 +1283,12 @@
}
},
"spec/mdc-textfield/issues/3332.html": {
"public_url": "https://storage.googleapis.com/mdc-web-screenshot-tests/travis/2018/08/23/20_10_17_804/spec/mdc-textfield/issues/3332.html",
"public_url": "https://storage.googleapis.com/mdc-web-screenshot-tests/travis/2018/10/01/23_31_41_483/spec/mdc-textfield/issues/3332.html?utm_source=golden_json",
"screenshots": {
"desktop_windows_chrome@latest": "https://storage.googleapis.com/mdc-web-screenshot-tests/travis/2018/08/23/20_10_17_804/spec/mdc-textfield/issues/3332.html.windows_chrome_68.png",
"desktop_windows_edge@latest": "https://storage.googleapis.com/mdc-web-screenshot-tests/travis/2018/08/23/20_10_17_804/spec/mdc-textfield/issues/3332.html.windows_edge_17.png",
"desktop_windows_firefox@latest": "https://storage.googleapis.com/mdc-web-screenshot-tests/travis/2018/08/23/20_10_17_804/spec/mdc-textfield/issues/3332.html.windows_firefox_61.png",
"desktop_windows_ie@11": "https://storage.googleapis.com/mdc-web-screenshot-tests/travis/2018/08/23/20_10_17_804/spec/mdc-textfield/issues/3332.html.windows_ie_11.png"
"desktop_windows_chrome@latest": "https://storage.googleapis.com/mdc-web-screenshot-tests/travis/2018/10/01/23_31_41_483/spec/mdc-textfield/issues/3332.html.windows_chrome_69.png",
"desktop_windows_edge@latest": "https://storage.googleapis.com/mdc-web-screenshot-tests/travis/2018/10/01/23_31_41_483/spec/mdc-textfield/issues/3332.html.windows_edge_17.png",
"desktop_windows_firefox@latest": "https://storage.googleapis.com/mdc-web-screenshot-tests/travis/2018/10/01/23_31_41_483/spec/mdc-textfield/issues/3332.html.windows_firefox_62.png",
"desktop_windows_ie@11": "https://storage.googleapis.com/mdc-web-screenshot-tests/travis/2018/10/01/23_31_41_483/spec/mdc-textfield/issues/3332.html.windows_ie_11.png"
}
},
"spec/mdc-typography/classes/baseline-large.html": {
Expand Down
6 changes: 6 additions & 0 deletions test/screenshot/spec/mdc-textfield/issues/3332.html
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,12 @@
</div>
</div>

<div class="test-cell test-cell--textfield" style="text-align: center;">
<div class="mdc-text-field mdc-text-field--textarea">
<textarea id="textarea" class="mdc-text-field__input" rows="8" cols="40"></textarea>
<label for="textarea" class="mdc-floating-label">Textarea Label</label>
</div>
</div>
</div>
</main>

Expand Down

0 comments on commit 19d0ca1

Please sign in to comment.