1
1
@import " ../variables" ;
2
2
@import " ../mixins" ;
3
+
3
4
$input-padding : 2 * $unit ;
4
5
$input-field-height : 1.6 * $unit ;
5
6
$input-field-padding : .8 * $unit ;
@@ -19,14 +20,15 @@ $input-icon-size: 2 * $input-icon-font-size;
19
20
.root {
20
21
position : relative ;
21
22
padding : $input-padding 0 ;
22
- & .with_icon {
23
+
24
+ & .with-icon {
23
25
margin-left : $input-icon-size ;
24
26
}
25
27
}
26
28
27
29
.icon {
28
30
position : absolute ;
29
- top : $offset ;
31
+ top : $offset ;
30
32
left : - $input-icon-size ;
31
33
display : block ;
32
34
width : $input-icon-size ;
@@ -48,23 +50,28 @@ $input-icon-size: 2 * $input-icon-font-size;
48
50
border : 0 ;
49
51
border-bottom : 1px solid $input-text-bottom-border-color ;
50
52
outline : none ;
53
+
51
54
& :focus {
52
55
~ .bar :before , ~ .bar :after {
53
56
width : 50% ;
54
57
}
58
+
55
59
~ .label :not (.fixed ) {
56
60
color : $input-text-highlight-color ;
57
61
}
62
+
58
63
~ .icon {
59
64
color : $input-text-highlight-color ;
60
65
}
61
66
}
67
+
62
68
& :focus , & .filled {
63
69
~ .label :not (.fixed ) {
64
70
top : $input-focus-label-top ;
65
71
font-size : $input-label-font-size ;
66
72
}
67
73
}
74
+
68
75
& .filled ~ .label.fixed {
69
76
display : none ;
70
77
}
@@ -87,6 +94,7 @@ $input-icon-size: 2 * $input-icon-font-size;
87
94
position : relative ;
88
95
display : block ;
89
96
width : 100% ;
97
+
90
98
& :before , & :after {
91
99
@include material-animation-default ();
92
100
position : absolute ;
@@ -97,9 +105,11 @@ $input-icon-size: 2 * $input-icon-font-size;
97
105
background-color : $input-text-highlight-color ;
98
106
transition-property : width , background-color ;
99
107
}
108
+
100
109
& :before {
101
110
left : 50% ;
102
111
}
112
+
103
113
& :after {
104
114
right : 50% ;
105
115
}
@@ -118,12 +128,15 @@ $input-icon-size: 2 * $input-icon-font-size;
118
128
119
129
.errored {
120
130
padding-bottom : 0 ;
131
+
121
132
> .input {
122
133
border-bottom-color : $input-text-error-color ;
134
+
123
135
& :focus {
124
136
~ .label :not (.fixed ) {
125
137
color : $input-text-error-color ;
126
138
}
139
+
127
140
~ .bar :before , ~ .bar :after {
128
141
background-color : $input-text-error-color ;
129
142
}
0 commit comments