fix(label): properly float labels for non-input items (#23060)

This commit is contained in:
Brandy Carney
2021-03-17 12:32:50 -04:00
committed by GitHub
parent 67617fbc0f
commit c8a3999da1
6 changed files with 386 additions and 3 deletions

View File

@ -23,18 +23,23 @@
:host(.label-floating) {
@include margin(null, null, 0, null);
@include transform(translate3d(0, 27px, 0));
@include transform(translate3d(0, 29px, 0));
@include transform-origin(start, top);
transition: transform 150ms ease-in-out;
}
:host-context(.item-textarea).label-floating {
@include transform(translate3d(0, 28px, 0));
}
:host-context(.item-has-focus).label-stacked,
:host-context(.item-has-focus).label-floating {
color: $label-ios-text-color-focused;
}
:host-context(.item-has-focus).label-floating,
:host-context(.item-has-placeholder:not(.item-input)).label-floating,
:host-context(.item-has-value).label-floating {
@include transform(translate3d(0, 0, 0), scale(.82));
}