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

Commit 47f3700

Browse files
devversionThomasBurleson
authored andcommitted
fix(input): calculate icon vertical offset
This aligns the icons as prefered in the material specs. Fixes #5731. Closes #5732.
1 parent 83829a7 commit 47f3700

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/components/input/input.scss

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@ $error-padding-top: ($input-error-height - $input-error-line-height) / 2;
2020

2121
$icon-offset: 36px !default;
2222

23+
$icon-top-offset: ($icon-offset - $input-padding-top - $input-border-width-focused) / 4;
24+
2325
$icon-float-focused-top: -8px !default;
2426

2527
md-input-container {
@@ -46,7 +48,7 @@ md-input-container {
4648

4749
> md-icon {
4850
position: absolute;
49-
top: 5px;
51+
top: $icon-top-offset;
5052
@include rtl(left, 2px, auto);
5153
@include rtl(right, auto, 2px);
5254
}
@@ -316,7 +318,7 @@ md-input-container {
316318
}
317319

318320
> md-icon {
319-
top: 2px;
321+
top: $icon-top-offset;
320322
@include rtl(left, 2px, auto);
321323
@include rtl(right, auto, 2px);
322324
}

0 commit comments

Comments
 (0)