Open mmalerba opened 4 years ago
When using an image that is not 1:1 aspect ratio as the icon or avatar for a list, it becomes distorted.
See reproduction: https://codepen.io/mmalerba/pen/BaoroME
Image is distorted
Image is scaled down, but not distorted
Add object-fit: cover to the styles for .mdc-list-item__graphic
object-fit: cover
.mdc-list-item__graphic
Thanks for filing! Going to add to our backlog, but feel free to send out a CL for this!
Bug report
When using an image that is not 1:1 aspect ratio as the icon or avatar for a list, it becomes distorted.
Steps to reproduce
See reproduction: https://codepen.io/mmalerba/pen/BaoroME
Actual behavior
Image is distorted
Expected behavior
Image is scaled down, but not distorted
Possible solution
Add
object-fit: cover
to the styles for.mdc-list-item__graphic