mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-19 03:32:21 +08:00
68 lines
1.8 KiB
SCSS
68 lines
1.8 KiB
SCSS
@import "../../globals.md";
|
|
@import "./text-input";
|
|
|
|
// Material Design Text Input
|
|
// --------------------------------------------------
|
|
|
|
$text-input-md-background-color: $list-md-background-color !default;
|
|
$text-input-md-highlight-color: map-get($colors-md, primary) !default;
|
|
$text-input-md-hightlight-color-valid: map-get($colors-md, secondary) !default;
|
|
$text-input-md-hightlight-color-invalid: map-get($colors-md, danger) !default;
|
|
|
|
|
|
// Default Input
|
|
// --------------------------------------------------
|
|
|
|
.item-input {
|
|
margin: $item-md-padding-top ($item-md-padding-right / 2) $item-md-padding-bottom ($item-md-padding-left / 2);
|
|
padding: 0;
|
|
background-color: $text-input-md-background-color;
|
|
}
|
|
|
|
|
|
// Inset Input
|
|
// --------------------------------------------------
|
|
|
|
.inset-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);
|
|
}
|
|
|
|
|
|
// Highlighted Input
|
|
// --------------------------------------------------
|
|
|
|
ion-input:after {
|
|
position: absolute;
|
|
bottom: 0;
|
|
right: 0;
|
|
left: $item-md-padding-left;
|
|
border-bottom-width: 2px;
|
|
border-bottom-style: solid;
|
|
border-bottom-color: transparent;
|
|
content: '';
|
|
}
|
|
|
|
.input-focused:after {
|
|
border-bottom-color: $text-input-md-highlight-color;
|
|
}
|
|
|
|
ion-input.ng-valid.input-has-value:after {
|
|
border-bottom-color: $text-input-md-hightlight-color-valid;
|
|
}
|
|
|
|
ion-input.ng-invalid.ng-touched:after {
|
|
border-bottom-color: $text-input-md-hightlight-color-invalid;
|
|
}
|
|
|
|
|
|
// Stacked & Floating Inputs
|
|
// --------------------------------------------------
|
|
|
|
.stacked-input,
|
|
.floating-input {
|
|
margin-left: 0;
|
|
margin-top: 8px;
|
|
margin-bottom: 8px;
|
|
}
|