mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2026-03-13 10:22:08 +08:00
fix(input): clean up CSS on inputs and labels
This commit is contained in:
committed by
Adam Bradley
parent
e76b55994c
commit
2fc975354a
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -222,6 +222,8 @@ export class TextInputBase {
|
||||
this.onTouched(textInputHasFocus);
|
||||
}
|
||||
});
|
||||
|
||||
this.checkHasValue(nativeInput.getValue());
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -113,6 +113,10 @@ export class NativeInput {
|
||||
return hasFocus(this.element());
|
||||
}
|
||||
|
||||
getValue(): string {
|
||||
return this.element().value;
|
||||
}
|
||||
|
||||
/**
|
||||
* @private
|
||||
*/
|
||||
|
||||
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user