File tree 4 files changed +22
-25
lines changed
4 files changed +22
-25
lines changed Original file line number Diff line number Diff line change 9
9
width : 100% ;
10
10
}
11
11
12
- .demo-icons {
13
- font-size : 100% ;
14
- height : inherit ;
15
- vertical-align : top ;
16
- width : inherit ;
17
- }
18
-
19
12
.demo-card {
20
13
margin : 16px ;
21
14
}
Original file line number Diff line number Diff line change 40
40
< td >
41
41
< md-input-container class ="demo-full-width ">
42
42
< input mdInput #postalCode maxLength ="5 " placeholder ="Postal Code " value ="94043 ">
43
- < md-hint align ="end "> {{postalCode.value.length}} / 5</ md-hint >
43
+ < md-hint align ="end ">
44
+ < md-icon > mode_edit</ md-icon >
45
+ {{postalCode.value.length}} / 5
46
+ </ md-hint >
44
47
</ md-input-container >
45
48
</ td >
46
49
</ tr > </ table >
51
54
< md-card class ="demo-card demo-basic ">
52
55
< md-toolbar color ="primary "> Prefix + Suffix</ md-toolbar >
53
56
< md-card-content >
57
+ < h4 > Text</ h4 >
54
58
< md-input-container align ="end ">
55
59
< input mdInput placeholder ="amount ">
56
60
< span mdPrefix > $ </ span >
57
61
< span mdSuffix > .00</ span >
58
62
</ md-input-container >
63
+
64
+ < h4 > Icons</ h4 >
65
+ < md-input-container >
66
+ < input mdInput placeholder ="amount ">
67
+ < md-icon mdPrefix > attach_money</ md-icon >
68
+ < md-icon mdSuffix > mode_edit</ md-icon >
69
+ </ md-input-container >
59
70
</ md-card-content >
60
71
</ md-card >
61
72
@@ -152,10 +163,10 @@ <h4>Textarea</h4>
152
163
< md-input-container >
153
164
< input mdInput >
154
165
< md-placeholder >
155
- I < md-icon class =" demo-icons " > favorite</ md-icon > < b > bold</ b > placeholder
166
+ I < md-icon > favorite</ md-icon > < b > bold</ b > placeholder
156
167
</ md-placeholder >
157
168
< md-hint >
158
- I also < md-icon class =" demo-icons " > home</ md-icon > < i > italic</ i > hint labels
169
+ I also < md-icon > home</ md-icon > < i > italic</ i > hint labels
159
170
</ md-hint >
160
171
</ md-input-container >
161
172
</ p >
Original file line number Diff line number Diff line change 8
8
width : 100% ;
9
9
}
10
10
11
- .demo-icons {
12
- font-size : 100% ;
13
- height : inherit ;
14
- vertical-align : top ;
15
- width : inherit ;
16
- }
17
-
18
11
.demo-card {
19
12
margin : 16px ;
20
13
}
Original file line number Diff line number Diff line change @@ -27,6 +27,14 @@ $mat-input-underline-disabled-background-image:
27
27
[dir = ' rtl' ] & {
28
28
text-align : right ;
29
29
}
30
+
31
+ // Allow icons in a prefix/suffix/hint/etc to adapt to the correct size.
32
+ & .mat-icon {
33
+ width : auto ;
34
+ height : auto ;
35
+ font-size : 100% ;
36
+ vertical-align : top ;
37
+ }
30
38
}
31
39
32
40
// Global wrapper. We need to apply margin to the element for spacing, but
@@ -238,12 +246,4 @@ $mat-input-underline-disabled-background-image:
238
246
// Prevents the prefix and suffix from stretching together with the container.
239
247
width : 0.1px ;
240
248
white-space : nowrap ;
241
-
242
- // Allow icons in a prefix/suffix to adapt to the correct size.
243
- & .mat-icon {
244
- width : auto ;
245
- height : auto ;
246
- font-size : 100% ;
247
- vertical-align : top ;
248
- }
249
249
}
You can’t perform that action at this time.
0 commit comments