fix(input): clean up CSS on inputs and labels

This commit is contained in:
Brandy Carney
2016-01-26 14:00:43 -05:00
committed by Adam Bradley
parent e76b55994c
commit 2fc975354a
11 changed files with 33 additions and 32 deletions

View File

@@ -33,8 +33,9 @@ $text-input-ios-input-clear-icon-size: 18px !default;
// iOS Stacked & Floating Inputs
// --------------------------------------------------
.stacked-input,
.floating-input {
.item-label-stacked .text-input,
.item-label-floating .text-input {
margin-left: 0;
margin-top: 8px;
margin-bottom: 8px;
}

View File

@@ -64,8 +64,8 @@ ion-input.ng-invalid.ng-touched:after {
// Material Design Stacked & Floating Inputs
// --------------------------------------------------
.stacked-input,
.floating-input {
.item-label-stacked .text-input,
.item-label-floating .text-input {
margin-left: 0;
margin-top: 8px;
margin-bottom: 8px;

View File

@@ -35,6 +35,10 @@ ion-textarea {
@include placeholder();
}
textarea.text-input {
display: block;
}
input.text-input:-webkit-autofill {
background-color: transparent;
@@ -109,4 +113,4 @@ input.text-input:-webkit-autofill {
position: absolute;
top: 0;
pointer-events: none;
}
}

View File

@@ -222,6 +222,8 @@ export class TextInputBase {
this.onTouched(textInputHasFocus);
}
});
this.checkHasValue(nativeInput.getValue());
}
/**

View File

@@ -113,6 +113,10 @@ export class NativeInput {
return hasFocus(this.element());
}
getValue(): string {
return this.element().value;
}
/**
* @private
*/

View File

@@ -1,5 +1,5 @@
<ion-toolbar><ion-title>Inline Label Text Input</ion-title></ion-toolbar>
<ion-toolbar><ion-title>Form Inputs</ion-title></ion-toolbar>
<ion-content>