From 29d2e3603053a51a93d514e83f419feaf89c9520 Mon Sep 17 00:00:00 2001 From: Kristiyan Kostadinov Date: Fri, 7 Nov 2025 09:19:54 +0100 Subject: [PATCH] fix(material/chips): avatar image stretched in Safari Works around a bug in Safari where the image inside a chip avatar can get stretched. --- src/material/chips/chip.scss | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/material/chips/chip.scss b/src/material/chips/chip.scss index acace3db6bb0..bbe6517b37cf 100644 --- a/src/material/chips/chip.scss +++ b/src/material/chips/chip.scss @@ -747,3 +747,9 @@ $fallbacks: m3-chip.get-tokens(); .mdc-evolution-chip__icon, .mat-mdc-chip-edit .mat-icon, .mat-mdc-chip-remove .mat-icon { min-height: fit-content; } + +// The `min-height: fit-content` above can stretch out image in Safari (see #32251). +// It also isn't necessary for image since their content doesn't affect the image container. +img.mdc-evolution-chip__icon { + min-height: 0; +}