fix(input): respect text-align value from form-field (#9397)

User agent stylesheets set the text-align of inputs explicitly to "start". Those can be easily overwritten by targeting the input element using a simple CSS selector, but since the text-align will be applied most of the time on the `mat-form-field` to also align the placeholder/label, the alignment should be inherited on the input.

Related to #5332
This commit is contained in:
Paul Gschwendtner
2018-01-23 16:40:56 +01:00
committed by Jeremy Elbourn
parent b3d2e78ecf
commit 51363618c6
+6
View File
@@ -26,6 +26,12 @@
// Needed to make last line of the textarea line up with the baseline.
vertical-align: bottom;
// User agent stylesheets set the text-align of inputs explicitly to "start". Those can be
// easily overwritten by targeting the input element using a simple CSS selector, but since
// the text-align will be applied most of the time on the `mat-form-field` to also align the
// placeholder, the alignment should be inherited here.
text-align: inherit;
// Undo the red box-shadow glow added by Firefox on invalid inputs.
// See https://developer.mozilla.org/en-US/docs/Web/CSS/:-moz-ui-invalid
&:-moz-ui-invalid {