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

update(input): remove align input binding #5141

Merged
merged 1 commit into from
Jun 16, 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
6 changes: 3 additions & 3 deletions src/demo-app/input/input-demo.html
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ <h4>Inside a form</h4>
<md-toolbar color="primary">Prefix + Suffix</md-toolbar>
<md-card-content>
<h4>Text</h4>
<md-input-container align="end">
<md-input-container class="demo-text-align-end">
<input mdInput placeholder="amount">
<span mdPrefix>$&nbsp;</span>
<span mdSuffix>.00</span>
Expand Down Expand Up @@ -301,13 +301,13 @@ <h4>Textarea</h4>
<input mdInput placeholder="Prefixed" value="example">
<div mdPrefix>Example:&nbsp;</div>
</md-input-container>
<md-input-container align="end">
<md-input-container class="demo-text-align-end">
<input mdInput placeholder="Suffixed" value="123">
<span mdSuffix>.00 €</span>
</md-input-container>
<br/>
Both:
<md-input-container align="end">
<md-input-container class="demo-text-align-end">
<input mdInput #email placeholder="Email Address" value="angular-core">
<span mdPrefix><md-icon [class.primary]="email.focused">email</md-icon>&nbsp;</span>
<span mdSuffix [class.primary]="email.focused">&nbsp;@gmail.com</span>
Expand Down
4 changes: 4 additions & 0 deletions src/demo-app/input/input-demo.scss
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@
margin: 16px;
}

.demo-text-align-end {
text-align: end;
}

.demo-textarea {
resize: none;
border: none;
Expand Down
2 changes: 1 addition & 1 deletion src/lib/input/input-container.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<ng-content select="[mdPrefix], [matPrefix]"></ng-content>
</div>

<div class="mat-input-infix" [class.mat-end]="align == 'end'">
<div class="mat-input-infix">
<ng-content selector="input, textarea"></ng-content>

<span class="mat-input-placeholder-wrapper">
Expand Down
8 changes: 0 additions & 8 deletions src/lib/input/input-container.scss
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
3 changes: 0 additions & 3 deletions src/lib/input/input-container.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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';

Expand Down