Skip to content

Commit

Permalink
Buttons block: lighten editor DOM even more. (#23222)
Browse files Browse the repository at this point in the history
* Buttons block: lighten editor DOM even more.

* Simplify editor styles.
  • Loading branch information
ZebulanStanphill authored Sep 25, 2020
1 parent 51233ab commit a14ab7f
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 13 deletions.
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
8 changes: 4 additions & 4 deletions packages/block-library/src/buttons/editor.scss
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
.wp-block-buttons .wp-block.block-editor-block-list__block[data-type="core/button"] {
display: inline-block;
width: auto;
.wp-block-buttons > .wp-block {
// Override editor auto block margins.
margin-left: 0;
}

.wp-block[data-align="center"] > .wp-block-buttons {
Expand All @@ -15,6 +15,6 @@
justify-content: flex-end;
}

.wp-block-buttons .block-list-appender {
.wp-block-buttons > .block-list-appender {
display: inline-block;
}

0 comments on commit a14ab7f

Please sign in to comment.