From 6cd387ebbe9dcf153656f80fdcf4b92eec9fd25d Mon Sep 17 00:00:00 2001 From: Lena Morita Date: Fri, 3 Mar 2023 05:27:45 +0900 Subject: [PATCH] Opt out from block inspector margins --- .../src/components/block-inspector/style.scss | 15 ++++++--------- packages/components/src/query-controls/index.tsx | 2 +- 2 files changed, 7 insertions(+), 10 deletions(-) diff --git a/packages/block-editor/src/components/block-inspector/style.scss b/packages/block-editor/src/components/block-inspector/style.scss index c6649d38c504b..3a107fb2f1b33 100644 --- a/packages/block-editor/src/components/block-inspector/style.scss +++ b/packages/block-editor/src/components/block-inspector/style.scss @@ -18,15 +18,12 @@ } } - // Reset unexpected margin-bottom from being applied to the `BaseControl` - // component of the `FocalPointPicker` component. - .components-focal-point-picker-control .components-base-control { - margin-bottom: 0; - } - - // Adjust margin-bottom from being applied to the `BaseControl` - .wp-block-latest-posts__sorting-filtering .components-base-control { - margin-bottom: $grid-unit-10; + // Reset unwanted margin-bottom from being applied to BaseControls within certain components. + .components-focal-point-picker-control, + .components-query-controls { + .components-base-control { + margin-bottom: 0; + } } .components-panel__body { diff --git a/packages/components/src/query-controls/index.tsx b/packages/components/src/query-controls/index.tsx index defb7597a238e..563f1f14ab0f4 100644 --- a/packages/components/src/query-controls/index.tsx +++ b/packages/components/src/query-controls/index.tsx @@ -76,7 +76,7 @@ export function QueryControls( { ...props }: QueryControlsProps ) { return ( - + { [ onOrderChange && onOrderByChange && (