mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-11-10 00:27:41 +08:00
item-start and item-end make more sense for RTL * refactor(item): replaced item-left with item-start replaced item-right with item-end * style(item): fix spacing * fix(item): add backwards support for left/right in ng-content * fix(item): deprecated old variables, not breaking change * fix(scss): fix variable name * fix(item): old attributes deprecated support
86 lines
2.0 KiB
SCSS
86 lines
2.0 KiB
SCSS
@import "../../themes/ionic.globals.wp";
|
|
|
|
// Windows Label
|
|
// --------------------------------------------------
|
|
|
|
/// @prop - Text color of the label by an input, select, or datetime
|
|
$label-wp-text-color: #999 !default;
|
|
|
|
/// @prop - Text color of the stacked/floating label when it is focused
|
|
$label-wp-text-color-focused: color($colors-wp, primary) !default;
|
|
|
|
|
|
// Windows Default Label
|
|
// --------------------------------------------------
|
|
|
|
.label-wp {
|
|
margin: $item-wp-padding-top ($item-wp-padding-right / 2) $item-wp-padding-bottom 0;
|
|
}
|
|
|
|
|
|
// Windows Default Label Inside An Input/Select Item
|
|
// --------------------------------------------------
|
|
|
|
.item-input .label-wp,
|
|
.item-select .label-wp,
|
|
.item-datetime .label-wp {
|
|
color: $label-wp-text-color;
|
|
}
|
|
|
|
|
|
// Windows Stacked & Floating Labels
|
|
// --------------------------------------------------
|
|
|
|
.label-wp[stacked] {
|
|
font-size: 1.2rem;
|
|
}
|
|
|
|
.label-wp[floating] {
|
|
transform: translate3d(8px, 34px, 0);
|
|
transform-origin: left top;
|
|
}
|
|
|
|
[dir="rtl"] .label-wp[floating] {
|
|
transform: translate3d(-8px, 34px, 0);
|
|
transform-origin: right top;
|
|
}
|
|
|
|
.label-wp[stacked],
|
|
.label-wp[floating] {
|
|
margin-bottom: 0;
|
|
margin-left: 0;
|
|
}
|
|
|
|
.input-has-focus .label-wp[stacked],
|
|
.input-has-focus .label-wp[floating] {
|
|
color: $label-wp-text-color-focused;
|
|
}
|
|
|
|
.input-has-focus .label-wp[floating],
|
|
.input-has-value .label-wp[floating] {
|
|
transform: translate3d(0, 0, 0) scale(.8);
|
|
}
|
|
|
|
.item-wp.item-label-stacked [item-right], // deprecated
|
|
.item-wp.item-label-floating [item-right], // deprecated
|
|
.item-wp.item-label-stacked [item-end],
|
|
.item-wp.item-label-floating [item-end] {
|
|
margin-top: $item-wp-padding-media-top + 4;
|
|
margin-bottom: $item-wp-padding-media-top + 4;
|
|
}
|
|
|
|
|
|
// Generate Windows Label colors
|
|
// --------------------------------------------------
|
|
|
|
@each $color-name, $color-base, $color-contrast in get-colors($colors-wp) {
|
|
|
|
.label-wp-#{$color-name},
|
|
.item-input .label-wp-#{$color-name},
|
|
.item-select .label-wp-#{$color-name},
|
|
.item-datetime .label-wp-#{$color-name} {
|
|
color: $color-base;
|
|
}
|
|
|
|
}
|