mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-19 03:32:21 +08:00
refactor(sass): moved all mode files to the top level component directory and renamed to include the directory name
references #689
This commit is contained in:
110
ionic/components/text-input/text-input.md.scss
Normal file
110
ionic/components/text-input/text-input.md.scss
Normal file
@ -0,0 +1,110 @@
|
||||
@import "../../globals.md";
|
||||
@import "./label";
|
||||
@import "./text-input";
|
||||
|
||||
// Material Design Text Input
|
||||
// --------------------------------------------------
|
||||
|
||||
$text-input-md-background-color: $list-md-background-color !default;
|
||||
$text-input-md-label-color: #999 !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;
|
||||
}
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
|
||||
// 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-label {
|
||||
font-size: 1.2rem;
|
||||
}
|
||||
|
||||
.floating-label {
|
||||
transform-origin: left top;
|
||||
transform: translate3d(0, 27px, 0);
|
||||
transition: transform 150ms ease-in-out;
|
||||
}
|
||||
|
||||
.stacked-label,
|
||||
.floating-label {
|
||||
margin-left: 0;
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
.stacked-input,
|
||||
.floating-input {
|
||||
margin-left: 0;
|
||||
margin-top: 8px;
|
||||
margin-bottom: 8px;
|
||||
}
|
||||
|
||||
.input-focused .stacked-label,
|
||||
.input-focused .floating-label {
|
||||
color: $text-input-md-highlight-color;
|
||||
}
|
||||
|
||||
.input-focused .floating-label,
|
||||
.input-has-value .floating-label {
|
||||
transform: translate3d(0, 0, 0) scale(0.8);
|
||||
}
|
||||
|
||||
|
||||
// Generate Material Design label colors
|
||||
// --------------------------------------------------
|
||||
|
||||
@each $color-name, $color-value in $colors-md {
|
||||
ion-label[#{$color-name}] {
|
||||
color: $color-value !important;
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user