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

Commit 6cac7da

Browse files
devversionRobert Messerle
authored andcommitted
fix(input): has-icon overwriting should have higher css priority as normal label without an icon.
At the moment the default label selector with (left: 0px) overwrites the label with icon selector. This can be fixed by changing the selector priority. Fixes #6005 Closes #6013
1 parent 358fd98 commit 6cac7da

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

src/components/input/input.scss

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -30,13 +30,6 @@ md-input-container {
3030
display: block;
3131
}
3232

33-
&.md-has-icon {
34-
padding-left: $icon-offset;
35-
> label {
36-
left: $icon-offset;
37-
}
38-
}
39-
4033
// When we have ng-messages, remove the input error height from our bottom padding, since the
4134
// ng-messages wrapper has a min-height of 1 error (so we don't adjust height as often; see below)
4235
&.md-input-has-messages {
@@ -93,6 +86,13 @@ md-input-container {
9386
left: 0;
9487
}
9588

89+
// icon offset should have higher priority as normal label
90+
&.md-has-icon {
91+
padding-left: $icon-offset;
92+
> label {
93+
left: $icon-offset;
94+
}
95+
}
9696

9797
label:not(.md-no-float):not(.md-container-ignore),
9898
.md-placeholder {

0 commit comments

Comments
 (0)