Skip to content

Commit

Permalink
fix(chips): improved image scaling in avatar (#12843)
Browse files Browse the repository at this point in the history
Along the same lines as #12660. Uses `object-fit: cover` to better scale the avatar image, where available.
  • Loading branch information
crisbeto authored and jelbourn committed Aug 27, 2018
1 parent 1f88bd7 commit f6e787a
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/lib/chips/chips.scss
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,10 @@ $mat-chip-remove-size: 18px;
align-items: center;
display: flex;
overflow: hidden;

// Makes `<img>` tags behave like `background-size: cover`. Not supported
// in IE, but we're using it as a progressive enhancement.
object-fit: cover;
}

input.mat-chip-input {
Expand Down

0 comments on commit f6e787a

Please sign in to comment.