Skip to content

Commit

Permalink
Buttons block: lighten editor DOM even more.
Browse files Browse the repository at this point in the history
  • Loading branch information
ZebulanStanphill committed Jun 24, 2020
1 parent b98418d commit 47a2c26
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 9 deletions.
17 changes: 8 additions & 9 deletions packages/block-library/src/buttons/edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,14 @@ const alignmentHooksSetting = {

function ButtonsEdit() {
return (
<Block.div>
<AlignmentHookSettingsProvider value={ alignmentHooksSetting }>
<InnerBlocks
allowedBlocks={ ALLOWED_BLOCKS }
template={ BUTTONS_TEMPLATE }
__experimentalMoverDirection="horizontal"
/>
</AlignmentHookSettingsProvider>
</Block.div>
<AlignmentHookSettingsProvider value={ alignmentHooksSetting }>
<InnerBlocks
allowedBlocks={ ALLOWED_BLOCKS }
__experimentalTagName={ Block.div }
template={ BUTTONS_TEMPLATE }
__experimentalMoverDirection="horizontal"
/>
</AlignmentHookSettingsProvider>
);
}

Expand Down
3 changes: 3 additions & 0 deletions packages/block-library/src/buttons/editor.scss
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
.wp-block-buttons .wp-block.block-editor-block-list__block[data-type="core/button"] {
display: inline-block;
width: auto;

// Override editor auto block margins.
margin-left: 0;
}

.wp-block[data-align="center"] > .wp-block-buttons {
Expand Down

0 comments on commit 47a2c26

Please sign in to comment.