Skip to content

Commit 70cb0a2

Browse files
crisbetojelbourn
authored andcommitted
fix(list): improved image scaling in avatar (#12660)
Improves the scaling for list avatar images that aren't exact squares. Fixes #8131.
1 parent f732059 commit 70cb0a2

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/lib/list/list.scss

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,10 @@ $mat-list-item-inset-divider-offset: 72px;
143143
height: $avatar-size;
144144
border-radius: 50%;
145145

146+
// Not supported in IE11, but we're using this as a
147+
// progressive enhancement to get better image scaling.
148+
object-fit: cover;
149+
146150
~ .mat-divider-inset {
147151
@include mat-inset-divider-offset($avatar-size, $mat-list-side-padding);
148152
}

0 commit comments

Comments
 (0)