fix(input): make icons in prefix/suffix the right size (#3342)

This commit is contained in:
mmalerba
2017-03-03 18:32:02 -08:00
committed by Kara
parent be167c95df
commit 63d4359fca
2 changed files with 11 additions and 8 deletions
+2 -7
View File
@@ -206,13 +206,8 @@
Both:
<md-input-container align="end">
<input mdInput #email placeholder="Email Address" value="angular-core">
<span mdPrefix>
<md-icon [class.primary]="email.focused" class="demo-icons demo-transform">email</md-icon>
&nbsp;
</span>
<span mdSuffix class="demo-transform" [class.primary]="email.focused">
&nbsp;@gmail.com
</span>
<span mdPrefix><md-icon [class.primary]="email.focused">email</md-icon>&nbsp;</span>
<span mdSuffix [class.primary]="email.focused">&nbsp;@gmail.com</span>
</md-input-container>
</p>
+9 -1
View File
@@ -234,8 +234,16 @@ $mat-input-underline-disabled-background-image:
}
}
// Prevents the prefix and suffix from stretching together with the container.
.mat-input-prefix, .mat-input-suffix {
// Prevents the prefix and suffix from stretching together with the container.
width: 0.1px;
white-space: nowrap;
// Allow icons in a prefix/suffix to adapt to the correct size.
& .mat-icon {
width: auto;
height: auto;
font-size: 100%;
vertical-align: top;
}
}