Skip to content

Commit

Permalink
fix(input): calculate icon vertical offset
Browse files Browse the repository at this point in the history
This aligns the icons as prefered in the material specs.

Fixes angular#5731
  • Loading branch information
devversion committed Jan 2, 2016
1 parent 8ef798f commit 8cb5bfb
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/components/input/input.scss
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ $error-padding-top: ($input-error-height - $input-error-line-height) / 2;

$icon-offset: 36px !default;

$icon-top-offset: ($icon-offset - $input-padding-top - $input-border-width-focused) / 4;

$icon-float-focused-top: -8px !default;

md-input-container {
Expand All @@ -45,7 +47,7 @@ md-input-container {

> md-icon {
position: absolute;
top: 5px;
top: $icon-top-offset;
@include rtl(left, 2px, auto);
@include rtl(right, auto, 2px);
}
Expand Down Expand Up @@ -313,7 +315,7 @@ md-input-container.md-icon-float {
}

> md-icon {
top: 2px;
top: $icon-top-offset;
@include rtl(left, 2px, auto);
@include rtl(right, auto, 2px);
}
Expand Down

0 comments on commit 8cb5bfb

Please sign in to comment.