Skip to content

Commit

Permalink
fix(list): improved image scaling in avatar (#12660)
Browse files Browse the repository at this point in the history
Improves the scaling for list avatar images that aren't exact squares.

Fixes #8131.
  • Loading branch information
crisbeto authored and jelbourn committed Aug 21, 2018
1 parent 136f5dd commit 9a59c2a
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/lib/list/list.scss
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,10 @@ $mat-list-item-inset-divider-offset: 72px;
height: $avatar-size;
border-radius: 50%;

// Not supported in IE11, but we're using this as a
// progressive enhancement to get better image scaling.
object-fit: cover;

~ .mat-divider-inset {
@include mat-inset-divider-offset($avatar-size, $mat-list-side-padding);
}
Expand Down

0 comments on commit 9a59c2a

Please sign in to comment.