From 45f867ba280aad2db9f441395c834df46b81b8db Mon Sep 17 00:00:00 2001 From: yogeshbhutkar Date: Mon, 27 Jan 2025 13:20:26 +0530 Subject: [PATCH 1/2] Spacer: Adjust to inherit `display` and `flex` properties --- packages/block-library/src/spacer/editor.scss | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/packages/block-library/src/spacer/editor.scss b/packages/block-library/src/spacer/editor.scss index e0c700795c0870..c4bad1635ef405 100644 --- a/packages/block-library/src/spacer/editor.scss +++ b/packages/block-library/src/spacer/editor.scss @@ -1,4 +1,7 @@ .block-editor-block-list__block[data-type="core/spacer"] { + display: inherit; + flex-direction: inherit; + // This generates an invisible field above the spacer, which makes its minimum clickable-to-select height larger. &::before { content: ""; @@ -45,4 +48,9 @@ // Important is used to have higher specificity than the inline style set by re-resizable library. height: 100% !important; } + + // Allows the resizable container to occupy all remaining vertical space. + &:not(.resize-horizontal) { + flex-grow: inherit; + } } From d1de345ebe47241c919c12b3e0f926463f7433c9 Mon Sep 17 00:00:00 2001 From: yogeshbhutkar Date: Mon, 27 Jan 2025 13:31:06 +0530 Subject: [PATCH 2/2] Update comment for resizable container to clarify vertical space usage --- packages/block-library/src/spacer/editor.scss | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/block-library/src/spacer/editor.scss b/packages/block-library/src/spacer/editor.scss index c4bad1635ef405..390d335f97aba7 100644 --- a/packages/block-library/src/spacer/editor.scss +++ b/packages/block-library/src/spacer/editor.scss @@ -49,7 +49,7 @@ height: 100% !important; } - // Allows the resizable container to occupy all remaining vertical space. + // Ensures the resizable container fills the remaining vertical space. &:not(.resize-horizontal) { flex-grow: inherit; }