From 77e104b7f5ebbecc5ce99da81e46bc5f69a0efe7 Mon Sep 17 00:00:00 2001 From: himanshupathak95 Date: Tue, 3 Dec 2024 08:53:39 +0530 Subject: [PATCH 1/2] Image Block: Fix inconsistent dimensions during selection --- packages/block-library/src/image/style.scss | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/packages/block-library/src/image/style.scss b/packages/block-library/src/image/style.scss index 117045f7dce62..9ba2cae4f3b88 100644 --- a/packages/block-library/src/image/style.scss +++ b/packages/block-library/src/image/style.scss @@ -123,6 +123,11 @@ border-radius: 0; } } + + .components-resizable-box__container { + max-width: inherit !important; + max-height: inherit !important; + } } // Variations From 4e0f8ad1565ae828d75e6c7a0e19460e46667bb5 Mon Sep 17 00:00:00 2001 From: himanshupathak95 Date: Thu, 16 Jan 2025 13:56:09 +0530 Subject: [PATCH 2/2] Image Block: Move the inheriting of max height and width to editor styles --- packages/block-library/src/image/editor.scss | 3 +++ packages/block-library/src/image/style.scss | 5 ----- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/packages/block-library/src/image/editor.scss b/packages/block-library/src/image/editor.scss index a7386205d9108..f27432819f2fc 100644 --- a/packages/block-library/src/image/editor.scss +++ b/packages/block-library/src/image/editor.scss @@ -59,6 +59,9 @@ figure.wp-block-image:not(.wp-block) { width: inherit; height: inherit; } + + max-width: inherit !important; + max-height: inherit !important; } .block-editor-block-list__block[data-type="core/image"] .block-editor-block-toolbar .block-editor-url-input__button-modal { diff --git a/packages/block-library/src/image/style.scss b/packages/block-library/src/image/style.scss index 9ba2cae4f3b88..117045f7dce62 100644 --- a/packages/block-library/src/image/style.scss +++ b/packages/block-library/src/image/style.scss @@ -123,11 +123,6 @@ border-radius: 0; } } - - .components-resizable-box__container { - max-width: inherit !important; - max-height: inherit !important; - } } // Variations