Skip to content

Commit 9ce803f

Browse files
crisbetojelbourn
authored andcommitted
fix(chips): improved image scaling in avatar
Along the same lines as #12660. Uses `object-fit: cover` to better scale the avatar image, where available.
1 parent 3723191 commit 9ce803f

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/lib/chips/chips.scss

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,10 @@ $mat-chip-remove-size: 18px;
151151
align-items: center;
152152
display: flex;
153153
overflow: hidden;
154+
155+
// Makes `<img>` tags behave like `background-size: cover`. Not supported
156+
// in IE, but we're using it as a progressive enhancement.
157+
object-fit: cover;
154158
}
155159

156160
input.mat-chip-input {

0 commit comments

Comments
 (0)