mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-18 19:21:34 +08:00
floating labels
This commit is contained in:
@ -28,9 +28,22 @@ ion-card[mode=ios] {
|
||||
margin-bottom: 4px;
|
||||
}
|
||||
|
||||
[stacked-label] .text-input {
|
||||
[stacked-label] .text-input,
|
||||
[floating-label] .text-input {
|
||||
margin-top: 8px;
|
||||
margin-bottom: 8px;
|
||||
}
|
||||
|
||||
[floating-label] ion-label {
|
||||
margin-bottom: 0;
|
||||
transform-origin: left top;
|
||||
transform: translate3d(0, 27px, 0);
|
||||
transition: transform 150ms ease-in-out;
|
||||
}
|
||||
|
||||
[floating-label].has-focus ion-label,
|
||||
[floating-label].has-value ion-label {
|
||||
transform: translate3d(0, 0, 0) scale(0.8);
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -43,14 +43,28 @@ ion-card[mode=md] {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
[stacked-label].has-focus ion-label {
|
||||
[stacked-label].has-focus ion-label,
|
||||
[floating-label].has-focus ion-label {
|
||||
color: $text-input-highlight-color;
|
||||
}
|
||||
|
||||
[stacked-label] .text-input {
|
||||
[stacked-label] .text-input,
|
||||
[floating-label] .text-input {
|
||||
margin-bottom: 8px;
|
||||
margin-top: 8px;
|
||||
}
|
||||
|
||||
[floating-label] ion-label {
|
||||
margin-bottom: 0;
|
||||
transform-origin: left top;
|
||||
transform: translate3d(0, 27px, 0);
|
||||
transition: transform 150ms ease-in-out;
|
||||
}
|
||||
|
||||
[floating-label].has-focus ion-label,
|
||||
[floating-label].has-value ion-label {
|
||||
transform: translate3d(0, 0, 0) scale(0.8);
|
||||
}
|
||||
}
|
||||
|
||||
.list[mode=md][inset] ion-input.item {
|
||||
|
Reference in New Issue
Block a user