mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-11-09 16:16:41 +08:00
91 lines
2.3 KiB
SCSS
91 lines
2.3 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 {
|
|
@include margin($item-wp-padding-top, ($item-wp-padding-end / 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] {
|
|
@include margin(null, null, 0, 0);
|
|
}
|
|
|
|
// TODO remove all uses of input-has-focus in v4
|
|
// TODO remove all uses of input-has-value in v4
|
|
.item-input-has-focus .label-wp[stacked],
|
|
.input-has-focus .label-wp[stacked],
|
|
.item-input-has-focus .label-wp[floating],
|
|
.input-has-focus .label-wp[floating] {
|
|
color: $label-wp-text-color-focused;
|
|
}
|
|
|
|
.item-input-has-focus .label-wp[floating],
|
|
.input-has-focus .label-wp[floating],
|
|
.item-input-has-value .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;
|
|
}
|
|
|
|
}
|