mirror of
https://github.com/angular/angular.git
synced 2026-09-14 13:54:52 +08:00
fix(input): make icons in prefix/suffix the right size (#3342)
This commit is contained in:
@@ -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>
|
||||
|
||||
</span>
|
||||
<span mdSuffix class="demo-transform" [class.primary]="email.focused">
|
||||
@gmail.com
|
||||
</span>
|
||||
<span mdPrefix><md-icon [class.primary]="email.focused">email</md-icon> </span>
|
||||
<span mdSuffix [class.primary]="email.focused"> @gmail.com</span>
|
||||
</md-input-container>
|
||||
</p>
|
||||
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user