From ead112f276e01d126269a35bebeac0a74b5f4c39 Mon Sep 17 00:00:00 2001 From: Mayank-Tripathi32 Date: Sat, 11 Jan 2025 01:54:35 +0530 Subject: [PATCH] feat: fixed width issue in frontend while inside stack --- packages/block-library/src/media-text/style.scss | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/packages/block-library/src/media-text/style.scss b/packages/block-library/src/media-text/style.scss index 727380a3759c6e..3563162e5e9daf 100644 --- a/packages/block-library/src/media-text/style.scss +++ b/packages/block-library/src/media-text/style.scss @@ -123,6 +123,11 @@ object-fit: cover; } +// We need to set the width explicitly to 100% to make sure the image is responsive and works with stack/crop. +.wp-block-media-text.is-image-fill-element { + width: 100%; +} + /* * Here we here not able to use a mobile first CSS approach. * Custom widths are set using inline styles, and on mobile,