Skip to content

Commit

Permalink
fix(input): placeholder text is hidden by parent visibility (#680)
Browse files Browse the repository at this point in the history
Previously, adding `visibility: hidden` to a parent element would not hide the placeholder text for inputs.

Closes #670
  • Loading branch information
robertmesserle authored and jelbourn committed Jun 20, 2016
1 parent 8df3246 commit b407278
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/components/input/input.scss
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ $md-input-underline-disabled-background-image: linear-gradient(to right,
* Applies a floating placeholder above the input itself.
*/
@mixin md-input-placeholder-floating {
visibility: visible;
display: block;
padding-bottom: 5px;
transform: translateY(-100%) scale(0.75);

Expand Down Expand Up @@ -103,15 +103,14 @@ $md-input-underline-disabled-background-image: linear-gradient(to right,
left: 0;
top: 0;

visibility: hidden;
font-size: 100%;
pointer-events: none; // We shouldn't catch mouse events (let them through).
color: $md-input-placeholder-color;
z-index: 1;

// Put ellipsis text overflow.
width: 100%;
display: block;
display: none;
white-space: nowrap;
text-overflow: ellipsis;
overflow-x: hidden;
Expand All @@ -123,7 +122,7 @@ $md-input-underline-disabled-background-image: linear-gradient(to right,
color $swift-ease-out-duration $swift-ease-out-timing-function;

&.md-empty {
visibility: visible;
display: block;
cursor: text;
}

Expand Down

0 comments on commit b407278

Please sign in to comment.