From b2dccaffd20ac546b1ad1de4a033310989bad6ba Mon Sep 17 00:00:00 2001 From: Paul Gschwendtner Date: Thu, 15 Jun 2017 02:02:17 +0200 Subject: [PATCH] update(input): remove align input binding * The `align` input property for the `md-input-container` is not doing anything special and can be easily replaced with normal CSS from the user. BREAKING CHANGE: The `align` input from the `` component has been removed. Developers instead should use plain CSS to archive the same (using `text-align: end` for example) Fixes #5140 --- src/demo-app/input/input-demo.html | 6 +++--- src/demo-app/input/input-demo.scss | 4 ++++ src/lib/input/input-container.html | 2 +- src/lib/input/input-container.scss | 8 -------- src/lib/input/input-container.ts | 3 --- 5 files changed, 8 insertions(+), 15 deletions(-) diff --git a/src/demo-app/input/input-demo.html b/src/demo-app/input/input-demo.html index 55b9b669b7da..c0d6c7a9dc9a 100644 --- a/src/demo-app/input/input-demo.html +++ b/src/demo-app/input/input-demo.html @@ -101,7 +101,7 @@

Inside a form

Prefix + Suffix

Text

- + .00 @@ -301,13 +301,13 @@

Textarea

Example: 
- + .00 €
Both: - + email   @gmail.com diff --git a/src/demo-app/input/input-demo.scss b/src/demo-app/input/input-demo.scss index 2325e7c67896..db8cb556622d 100644 --- a/src/demo-app/input/input-demo.scss +++ b/src/demo-app/input/input-demo.scss @@ -12,6 +12,10 @@ margin: 16px; } +.demo-text-align-end { + text-align: end; +} + .demo-textarea { resize: none; border: none; diff --git a/src/lib/input/input-container.html b/src/lib/input/input-container.html index 5a95d29c6b64..05b9ebabb24f 100644 --- a/src/lib/input/input-container.html +++ b/src/lib/input/input-container.html @@ -4,7 +4,7 @@ -
+
diff --git a/src/lib/input/input-container.scss b/src/lib/input/input-container.scss index 2c630549db17..3d36c8d3c320 100644 --- a/src/lib/input/input-container.scss +++ b/src/lib/input/input-container.scss @@ -88,14 +88,6 @@ $mat-input-underline-height: 1px !default; // Needed to make last line of the textarea line up with the baseline. vertical-align: bottom; - .mat-end & { - text-align: right; - - [dir='rtl'] & { - text-align: left; - } - } - // 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 { diff --git a/src/lib/input/input-container.ts b/src/lib/input/input-container.ts index 21a52d8ab734..fb0512bcef98 100644 --- a/src/lib/input/input-container.ts +++ b/src/lib/input/input-container.ts @@ -324,9 +324,6 @@ export class MdInputDirective { export class MdInputContainer implements AfterViewInit, AfterContentInit, AfterContentChecked { private _placeholderOptions: PlaceholderOptions; - /** Alignment of the input container's content. */ - @Input() align: 'start' | 'end' = 'start'; - /** Color of the input divider, based on the theme. */ @Input() color: 'primary' | 'accent' | 'warn' = 'primary';