From b3579a3359fa4e29177a3a1803e05e54b1bab278 Mon Sep 17 00:00:00 2001 From: Juan Aldasoro Date: Mon, 4 Nov 2024 11:17:53 +0100 Subject: [PATCH] Set the `fit-content` width for images that are not `.svg` (#66643) Co-authored-by: juanfra Co-authored-by: aaronrobertshaw Co-authored-by: kevin940726 Co-authored-by: getdave --- packages/block-library/src/image/style.scss | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/packages/block-library/src/image/style.scss b/packages/block-library/src/image/style.scss index da4ccc50dac7f1..79689e82006cdc 100644 --- a/packages/block-library/src/image/style.scss +++ b/packages/block-library/src/image/style.scss @@ -9,7 +9,10 @@ max-width: 100%; vertical-align: bottom; box-sizing: border-box; - width: fit-content; + + &:not([src$=".svg"]) { + width: fit-content; + } @media (prefers-reduced-motion: no-preference) { &.hide {