From be9e0377d8307a2e83698af0f1932a14471af288 Mon Sep 17 00:00:00 2001 From: Lena Morita Date: Sat, 28 Sep 2024 03:52:55 +0900 Subject: [PATCH 1/2] InspectorControls: Try prop to bypass BaseControl margin --- .../src/components/block-inspector/style.scss | 1 + .../src/components/inspector-controls/fill.js | 11 ++++++++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/packages/block-editor/src/components/block-inspector/style.scss b/packages/block-editor/src/components/block-inspector/style.scss index 92a9a0dd03ab35..abca451035fdea 100644 --- a/packages/block-editor/src/components/block-inspector/style.scss +++ b/packages/block-editor/src/components/block-inspector/style.scss @@ -17,6 +17,7 @@ } // Reset unwanted margin-bottom from being applied to BaseControls within certain components. + .block-editor-inspector-controls__no-base-control-margin, .components-focal-point-picker-control, .components-query-controls, .components-range-control { diff --git a/packages/block-editor/src/components/inspector-controls/fill.js b/packages/block-editor/src/components/inspector-controls/fill.js index 456b33af9137fe..3c8886f92159c0 100644 --- a/packages/block-editor/src/components/inspector-controls/fill.js +++ b/packages/block-editor/src/components/inspector-controls/fill.js @@ -22,6 +22,7 @@ export default function InspectorControlsFill( { children, group = 'default', __experimentalGroup, + __nextNoBaseControlMargin = false, resetAllFilter, } ) { if ( __experimentalGroup ) { @@ -53,7 +54,15 @@ export default function InspectorControlsFill( { return ( + { children } + + ) : ( + children + ) + } resetAllFilter={ resetAllFilter } /> ); From b4286652de7337bfdaf02f2a9abeb6f11399327c Mon Sep 17 00:00:00 2001 From: Lena Morita Date: Sat, 28 Sep 2024 03:53:11 +0900 Subject: [PATCH 2/2] Apply in Post Author block --- packages/block-library/src/editor.scss | 1 - packages/block-library/src/post-author/edit.js | 7 ++----- packages/block-library/src/post-author/editor.scss | 7 ------- 3 files changed, 2 insertions(+), 13 deletions(-) delete mode 100644 packages/block-library/src/post-author/editor.scss diff --git a/packages/block-library/src/editor.scss b/packages/block-library/src/editor.scss index 0669a082b1086f..52f3aa64287fae 100644 --- a/packages/block-library/src/editor.scss +++ b/packages/block-library/src/editor.scss @@ -31,7 +31,6 @@ @import "./nextpage/editor.scss"; @import "./page-list/editor.scss"; @import "./paragraph/editor.scss"; -@import "./post-author/editor.scss"; @import "./post-excerpt/editor.scss"; @import "./pullquote/editor.scss"; @import "./rss/editor.scss"; diff --git a/packages/block-library/src/post-author/edit.js b/packages/block-library/src/post-author/edit.js index 6186b0d052e8aa..c0c9934994ffeb 100644 --- a/packages/block-library/src/post-author/edit.js +++ b/packages/block-library/src/post-author/edit.js @@ -99,12 +99,9 @@ function PostAuthorEdit( { return ( <> - + - + { showAuthorControl && ( ( showCombobox && (