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

Commit 437f764

Browse files
crisbetoThomasBurleson
authored andcommitted
fix(input): prevent the floating label from overflowing
The calc that was used to truncate the long input labels was actually making them longer on IE. This is because IE calculates whether to overflow an element before applying any of the transforms. Closes #7403. Closes #8116
1 parent ce0ebbf commit 437f764

File tree

1 file changed

+0
-23
lines changed

1 file changed

+0
-23
lines changed

src/components/input/input.scss

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -293,7 +293,6 @@ md-input-container {
293293
transform: translate3d(0, $input-label-float-offset, 0) scale($input-label-float-scale);
294294
transition: transform $swift-ease-out-timing-function $swift-ease-out-duration,
295295
width $swift-ease-out-timing-function $swift-ease-out-duration;
296-
width: calc((100% - #{$input-label-float-width}) / #{$input-label-float-scale});
297296
}
298297
}
299298

@@ -351,17 +350,6 @@ md-input-container {
351350
width: calc(100% - #{$icon-offset} - #{$input-label-float-width});
352351
}
353352
}
354-
355-
&.md-input-focused,
356-
&.md-input-has-placeholder,
357-
&.md-input-has-value {
358-
> label {
359-
&:not(.md-no-float):not(._md-container-ignore),
360-
.md-placeholder {
361-
width: calc((100% - #{$icon-offset} - #{$input-label-float-width}) / #{$input-label-float-scale});
362-
}
363-
}
364-
}
365353
}
366354

367355
// icon offset should have higher priority as normal label
@@ -396,17 +384,6 @@ md-input-container {
396384
width: calc(100% - (#{$icon-offset} * 2));
397385
}
398386
}
399-
400-
&.md-input-focused,
401-
&.md-input-has-placeholder,
402-
&.md-input-has-value {
403-
> label {
404-
&:not(.md-no-float):not(._md-container-ignore),
405-
.md-placeholder {
406-
width: calc((100% - (#{$icon-offset} * 2)) / #{$input-label-float-scale});
407-
}
408-
}
409-
}
410387
}
411388
}
412389

0 commit comments

Comments
 (0)