Skip to content
This repository was archived by the owner on Sep 5, 2024. It is now read-only.

Commit b8563b9

Browse files
committed
fix(input): prevent the floating label from overflowing
The calc that was used to truncate the long input labels was actually making them longer. Closes #7403.
1 parent 562d7c1 commit b8563b9

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/components/input/input.scss

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -285,7 +285,7 @@ md-input-container {
285285
transform: translate3d(0, $input-label-float-offset, 0) scale($input-label-float-scale);
286286
transition: transform $swift-ease-out-timing-function $swift-ease-out-duration,
287287
width $swift-ease-out-timing-function $swift-ease-out-duration;
288-
width: calc((100% - #{$input-label-float-width}) / #{$input-label-float-scale});
288+
width: calc((100% - #{$input-label-float-width}) * #{$input-label-float-scale});
289289
}
290290
}
291291

@@ -349,7 +349,7 @@ md-input-container {
349349
> label {
350350
&:not(.md-no-float):not(._md-container-ignore),
351351
.md-placeholder {
352-
width: calc((100% - #{$icon-offset} - #{$input-label-float-width}) / #{$input-label-float-scale});
352+
width: calc((100% - #{$icon-offset} - #{$input-label-float-width}) * #{$input-label-float-scale});
353353
}
354354
}
355355
}
@@ -394,7 +394,7 @@ md-input-container {
394394
> label {
395395
&:not(.md-no-float):not(._md-container-ignore),
396396
.md-placeholder {
397-
width: calc((100% - (#{$icon-offset} * 2)) / #{$input-label-float-scale});
397+
width: calc((100% - (#{$icon-offset} * 2)) * #{$input-label-float-scale});
398398
}
399399
}
400400
}

0 commit comments

Comments
 (0)