Skip to content

Commit

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

Fixes angular#8131.
  • Loading branch information
crisbeto committed Aug 13, 2018
1 parent 499458c commit e47f84b
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 e47f84b

Please sign in to comment.