mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-19 03:32:21 +08:00
80 lines
1.8 KiB
SCSS
80 lines
1.8 KiB
SCSS
@import "../../globals.ios";
|
|
@import "./label";
|
|
@import "./text-input";
|
|
|
|
// iOS Text Input
|
|
// --------------------------------------------------
|
|
|
|
$text-input-ios-background-color: $list-ios-background-color !default;
|
|
$text-input-ios-label-color: #7f7f7f !default;
|
|
|
|
|
|
// Default Input
|
|
// --------------------------------------------------
|
|
|
|
.item-input {
|
|
margin: $item-ios-padding-top ($item-ios-padding-right / 2) $item-ios-padding-bottom 0;
|
|
padding: 0;
|
|
background-color: $text-input-ios-background-color;
|
|
}
|
|
|
|
ion-label {
|
|
margin: $item-ios-padding-top ($item-ios-padding-right / 2) $item-ios-padding-bottom 0;
|
|
color: $text-input-ios-label-color;
|
|
}
|
|
|
|
ion-label + .item-input {
|
|
margin-left: $item-ios-padding-left;
|
|
}
|
|
|
|
|
|
// Inset Input
|
|
// --------------------------------------------------
|
|
|
|
.inset-input {
|
|
margin: ($item-ios-padding-top / 2) $item-ios-padding-right ($item-ios-padding-bottom / 2) $item-ios-padding-left;
|
|
padding: ($item-ios-padding-top / 2) ($item-ios-padding-right / 2) ($item-ios-padding-bottom / 2) ($item-ios-padding-left / 2);
|
|
}
|
|
|
|
|
|
// Stacked & Floating Inputs
|
|
// --------------------------------------------------
|
|
|
|
.stacked-label {
|
|
font-size: 1.2rem;
|
|
margin-bottom: 4px;
|
|
}
|
|
|
|
.floating-label {
|
|
margin-bottom: 0;
|
|
transform-origin: left top;
|
|
transform: translate3d(0, 27px, 0);
|
|
transition: transform 150ms ease-in-out;
|
|
}
|
|
|
|
.stacked-input,
|
|
.floating-input {
|
|
margin-top: 8px;
|
|
margin-bottom: 8px;
|
|
}
|
|
|
|
.input-focused .floating-label,
|
|
.input-has-value .floating-label {
|
|
transform: translate3d(0, 0, 0) scale(0.8);
|
|
}
|
|
|
|
ion-label + .stacked-input,
|
|
ion-label + .floating-input {
|
|
margin-left: 0;
|
|
}
|
|
|
|
|
|
// Generate iOS label colors
|
|
// --------------------------------------------------
|
|
|
|
@each $color-name, $color-value in $colors-ios {
|
|
ion-label[#{$color-name}] {
|
|
color: $color-value !important;
|
|
}
|
|
}
|