From 8a74d31f28e4d5ddc6f21be1bc2134e675d2913f Mon Sep 17 00:00:00 2001 From: Lena Morita Date: Thu, 12 Sep 2024 06:14:31 +0900 Subject: [PATCH] Normalize block inspector controls spacing (#64526) * Try block inspector controls spacing normalization * Decrease specificity * Add changelog * Grid block: Fix when experimental grid interactivity * Remove adjustment for bottom padding * Revert "Add changelog" This reverts commit 7939750f87b2d35d3f54deab4c8c91df5d49e2c8. * Remove unnecessary margin on Layout hook toggle (#65133) Co-authored-by: mirka <0mirka00@git.wordpress.org> Co-authored-by: ciampo Co-authored-by: jameskoster Co-authored-by: tyxla --- .../src/components/block-inspector/style.scss | 6 ++-- packages/block-editor/src/hooks/layout.js | 1 - packages/block-editor/src/hooks/layout.scss | 4 --- packages/block-editor/src/layouts/grid.js | 29 ++++++++++--------- 4 files changed, 18 insertions(+), 22 deletions(-) diff --git a/packages/block-editor/src/components/block-inspector/style.scss b/packages/block-editor/src/components/block-inspector/style.scss index cf7131722722c..bdbf3660d9619 100644 --- a/packages/block-editor/src/components/block-inspector/style.scss +++ b/packages/block-editor/src/components/block-inspector/style.scss @@ -11,10 +11,8 @@ } .components-base-control { - margin-bottom: #{ $grid-unit-30 }; - - &:last-child { - margin-bottom: $grid-unit-10; + &:where(:not(:last-child)) { + margin-bottom: $grid-unit-20; } } diff --git a/packages/block-editor/src/hooks/layout.js b/packages/block-editor/src/hooks/layout.js index 2ea8c5f37c9e7..22d916d7b791b 100644 --- a/packages/block-editor/src/hooks/layout.js +++ b/packages/block-editor/src/hooks/layout.js @@ -233,7 +233,6 @@ function LayoutPanelPure( { <> - { showColumnsControl && ( - - ) } - { showMinWidthControl && ( - - ) } + + { showColumnsControl && ( + + ) } + { showMinWidthControl && ( + + ) } + ); },