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 Sep 22, 2020
1 parent 1a2961a commit 93bf03e
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 10 deletions.
2 changes: 1 addition & 1 deletion packages/block-editor/src/components/block-list/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,8 @@ function BlockList(

return (
<Container
{ ...__experimentalPassedProps }
ref={ ref }
{ ...__experimentalPassedProps }
className={ classnames(
'block-editor-block-list__layout',
className,
Expand Down
18 changes: 9 additions & 9 deletions packages/block-library/src/buttons/edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,15 @@ const alignmentHooksSetting = {
function ButtonsEdit() {
const blockWrapperProps = useBlockWrapperProps();
return (
<div { ...blockWrapperProps }>
<AlignmentHookSettingsProvider value={ alignmentHooksSetting }>
<InnerBlocks
allowedBlocks={ ALLOWED_BLOCKS }
template={ BUTTONS_TEMPLATE }
orientation="horizontal"
/>
</AlignmentHookSettingsProvider>
</div>
<AlignmentHookSettingsProvider value={ alignmentHooksSetting }>
<InnerBlocks
allowedBlocks={ ALLOWED_BLOCKS }
__experimentalPassedProps={ blockWrapperProps }
__experimentalTagName="div"
template={ BUTTONS_TEMPLATE }
orientation="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 93bf03e

Please sign in to comment.