fix(material/chips): fix stretched chip avatar image #32264
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR fixes a bug in the Material chip component where avatar images were significantly vertically stretched on many browsers. After some investigation, it appears this bug was introduced with #30867 - reverting the CSS rule here fixes the issue on both Safari (where it was most prominent) and on Chrome.
Before (Vertical Stretching Issue)
In both Safari and Chrome, chip images were stretched (though Safari to a much greater extent).
After
Images appear correctly when testing in the dev environment in both Safari and Chrome:
All chip component tests pass after this change is made.
Consequences
Since this PR reverts #30867, the previously mentioned bug with text spacing may be re-introduced. I was unable to replicate it in the dev environment, though it might be something to look into. Still wanted to open this PR since this issue seems widespread for all uses of the avatar on the chip component and is currently affecting applications in production using the new version.
Fixes #32251.