Skip to content

Commit

Permalink
fix(ui/input, select): fix placeholder animation and var--ellipsis class
Browse files Browse the repository at this point in the history
affects: @varlet/ui
  • Loading branch information
haoziqaq committed Dec 25, 2021
1 parent a2c0dbc commit 458ab30
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
5 changes: 3 additions & 2 deletions packages/varlet-ui/src/input/input.less
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@
left: 0;
width: 100%;
transform-origin: left;
transition-property: top, transform;
transition-property: top, transform, width;
transition-duration: 0.3s;
transform: translate(0, calc(-50% + var(--input-placeholder-size) / 2)) scale(1);
font-size: var(--input-placeholder-size);
Expand All @@ -83,7 +83,8 @@
left: 0;
width: 100%;
transform-origin: left;
transition: transform 0.3s;
transition-property: transform, width;
transition-duration: 0.3s;
transform: translate(0, calc(var(--input-textarea-padding-top) + var(--input-placeholder-size))) scale(1);
font-size: var(--input-placeholder-size);
color: var(--input-blur-color);
Expand Down
2 changes: 1 addition & 1 deletion packages/varlet-ui/src/select/select.less
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@
left: 0;
width: 100%;
transform-origin: left;
transition-property: top, transform;
transition-property: top, transform, width;
transition-duration: 0.3s;
transform: translate(0, calc(-50% + var(--select-placeholder-size) / 2)) scale(1);
font-size: var(--select-placeholder-size);
Expand Down
1 change: 1 addition & 0 deletions packages/varlet-ui/src/styles/common.less
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
&--ellipsis {
overflow-x: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}

&--inline-block {
Expand Down

0 comments on commit 458ab30

Please sign in to comment.