Skip to content

Commit 7b63d95

Browse files
committed
fix(material/chips): avatar image stretched in Safari (#32278)
Works around a bug in Safari where the image inside a chip avatar can get stretched. (cherry picked from commit e093077)
1 parent 3ede499 commit 7b63d95

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/material/chips/chip.scss

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -737,3 +737,9 @@ $fallbacks: m3-chip.get-tokens();
737737
.mdc-evolution-chip__icon, .mat-mdc-chip-edit .mat-icon, .mat-mdc-chip-remove .mat-icon {
738738
min-height: fit-content;
739739
}
740+
741+
// The `min-height: fit-content` above can stretch out image in Safari (see #32251).
742+
// It also isn't necessary for image since their content doesn't affect the image container.
743+
img.mdc-evolution-chip__icon {
744+
min-height: 0;
745+
}

0 commit comments

Comments
 (0)