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

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 #5731. Closes #5732.
  • Loading branch information
devversion authored and ThomasBurleson committed Feb 4, 2016
1 parent 83829a7 commit 47f3700
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 @@ -20,6 +20,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 @@ -46,7 +48,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 @@ -316,7 +318,7 @@ md-input-container {
}

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

0 comments on commit 47f3700

Please sign in to comment.