mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-19 03:32:21 +08:00
83 lines
2.1 KiB
SCSS
83 lines
2.1 KiB
SCSS
@import "../../../globals.md";
|
|
@import "../label";
|
|
@import "../text-input";
|
|
|
|
// Material Design Text Input
|
|
// --------------------------------------------------
|
|
|
|
$text-input-md-label-color: #999 !default;
|
|
$text-input-md-highlight-color: color(primary) !default;
|
|
$text-input-md-hightlight-color-valid: color(secondary) !default;
|
|
$text-input-md-hightlight-color-invalid: color(danger) !default;
|
|
|
|
|
|
[text-input] {
|
|
margin: $item-md-padding-top ($item-md-padding-right / 2) $item-md-padding-bottom ($item-md-padding-left / 2);
|
|
padding: 0;
|
|
}
|
|
|
|
ion-input[inset] [text-input] {
|
|
margin: ($item-md-padding-top / 2) $item-md-padding-right ($item-md-padding-bottom / 2) $item-md-padding-left;
|
|
padding: ($item-md-padding-top / 2) ($item-md-padding-right / 2) ($item-md-padding-bottom / 2) ($item-md-padding-left / 2);
|
|
}
|
|
|
|
ion-label {
|
|
margin: $item-md-padding-top ($item-md-padding-right / 2) $item-md-padding-bottom ($item-md-padding-left / 2);
|
|
color: $text-input-md-label-color;
|
|
}
|
|
|
|
ion-input:after {
|
|
position: absolute;
|
|
bottom: 0;
|
|
right: 0;
|
|
left: $item-md-padding-left;
|
|
border-bottom: 2px solid transparent;
|
|
content: '';
|
|
}
|
|
|
|
ion-input.has-focus:after {
|
|
border-bottom: 2px solid $text-input-md-highlight-color;
|
|
}
|
|
|
|
ion-input.ng-valid.has-value:after {
|
|
border-bottom: 2px solid $text-input-md-hightlight-color-valid;
|
|
}
|
|
|
|
ion-input.ng-invalid.ng-touched:after {
|
|
border-bottom: 2px solid $text-input-md-hightlight-color-invalid;
|
|
}
|
|
|
|
[stacked-label] ion-label {
|
|
font-size: 1.2rem;
|
|
margin-bottom: 0;
|
|
}
|
|
|
|
[stacked-label] ion-label,
|
|
[floating-label] ion-label {
|
|
margin-left: 0;
|
|
}
|
|
|
|
[stacked-label].has-focus ion-label,
|
|
[floating-label].has-focus ion-label {
|
|
color: $text-input-md-highlight-color;
|
|
}
|
|
|
|
[stacked-label] [text-input],
|
|
[floating-label] [text-input] {
|
|
margin-bottom: 8px;
|
|
margin-top: 8px;
|
|
margin-left: 0;
|
|
}
|
|
|
|
[floating-label] ion-label {
|
|
margin-bottom: 0;
|
|
transform-origin: left top;
|
|
transform: translate3d(0, 27px, 0);
|
|
transition: transform 150ms ease-in-out;
|
|
}
|
|
|
|
[floating-label].has-focus ion-label,
|
|
[floating-label].has-value ion-label {
|
|
transform: translate3d(0, 0, 0) scale(0.8);
|
|
}
|