Skip to content

Commit

Permalink
fix(input): add more padding so that the hint doesn't overflow the co…
Browse files Browse the repository at this point in the history
…ntainer (#2246)

* 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.

* remove useless transition
  • Loading branch information
mmalerba authored and tinayuangao committed Jan 12, 2017
1 parent d9b2d85 commit d7831d9
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/lib/input/input.scss
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,7 @@ $md-input-underline-disabled-background-image:
// Applies a floating placeholder above the input itself.
@mixin md-input-placeholder-floating {
display: block;
padding-bottom: 5px;
transform: translateY(-100%) scale($md-input-floating-placeholder-scale-factor);
transform: translateY(-1.35em) scale($md-input-floating-placeholder-scale-factor);
width: 100% / $md-input-floating-placeholder-scale-factor;
}

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

// We use a table layout to baseline align the prefix and suffix classes.
Expand Down Expand Up @@ -122,7 +123,6 @@ md-input, md-textarea {
transform: translateY(0);
transform-origin: bottom left;
transition: transform $swift-ease-out-duration $swift-ease-out-timing-function,
scale $swift-ease-out-duration $swift-ease-out-timing-function,
color $swift-ease-out-duration $swift-ease-out-timing-function,
width $swift-ease-out-duration $swift-ease-out-timing-function;

Expand Down Expand Up @@ -184,7 +184,7 @@ md-input, md-textarea {
display: block;
position: absolute;
font-size: 75%;
bottom: -0.5em;
bottom: 0;

&.md-right {
right: 0;
Expand Down

0 comments on commit d7831d9

Please sign in to comment.