Skip to content

Commit

Permalink
Add margin override to Latest Posts block to adjust for QueryControls…
Browse files Browse the repository at this point in the history
… spacing
  • Loading branch information
brookewp committed Feb 28, 2023
1 parent 57187b7 commit 6fe783f
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,11 @@
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;
}

.components-panel__body {
border: none;
border-top: $border-width solid $gray-200;
Expand Down
5 changes: 4 additions & 1 deletion packages/block-library/src/latest-posts/edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -327,7 +327,10 @@ export default function LatestPostsEdit( { attributes, setAttributes } ) {
) }
</PanelBody>

<PanelBody title={ __( 'Sorting and filtering' ) }>
<PanelBody
className="wp-block-latest-posts__sorting-filtering"
title={ __( 'Sorting and filtering' ) }
>
<QueryControls
{ ...{ order, orderBy } }
numberOfItems={ postsToShow }
Expand Down

0 comments on commit 6fe783f

Please sign in to comment.