Skip to content

Commit 6288070

Browse files
committed
fix(input): add more padding so that the hint does overflow the container
also use em instead of px for some things so things don't overflow when using other font sizes.
1 parent 2897b9b commit 6288070

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

src/lib/input/input.scss

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,7 @@ $md-input-underline-disabled-background-image:
1111
// Applies a floating placeholder above the input itself.
1212
@mixin md-input-placeholder-floating {
1313
display: block;
14-
padding-bottom: 5px;
15-
transform: translateY(-100%) scale($md-input-floating-placeholder-scale-factor);
14+
transform: translateY(-1.35em) scale($md-input-floating-placeholder-scale-factor);
1615
width: 100% / $md-input-floating-placeholder-scale-factor;
1716
}
1817

@@ -33,7 +32,9 @@ md-input, md-textarea {
3332
// Global wrapper. We need to apply margin to the element for spacing, but
3433
// cannot apply it to the host element directly.
3534
.md-input-wrapper {
36-
margin: 16px 0;
35+
margin: 1em 0;
36+
// Account for the underline which has 4px of margin + 2px of border.
37+
padding-bottom: 6px;
3738
}
3839

3940
// We use a table layout to baseline align the prefix and suffix classes.
@@ -184,7 +185,7 @@ md-input, md-textarea {
184185
display: block;
185186
position: absolute;
186187
font-size: 75%;
187-
bottom: -0.5em;
188+
bottom: 0;
188189

189190
&.md-right {
190191
right: 0;

0 commit comments

Comments
 (0)