diff --git a/packages/block-editor/src/components/block-list/block-wrapper.js b/packages/block-editor/src/components/block-list/block-wrapper.js index bcd5d4c38929f5..ff54e2f7e4278f 100644 --- a/packages/block-editor/src/components/block-list/block-wrapper.js +++ b/packages/block-editor/src/components/block-list/block-wrapper.js @@ -48,6 +48,7 @@ const BlockComponent = forwardRef( name, mode, blockTitle, + wrapperProps, } = useContext( BlockContext ); const { initialPosition } = useSelect( ( select ) => { @@ -203,6 +204,7 @@ const BlockComponent = forwardRef( // Overrideable props. aria-label={ blockLabel } role="group" + { ...wrapperProps } { ...props } id={ blockElementId } ref={ wrapper } diff --git a/packages/block-editor/src/components/block-list/block.js b/packages/block-editor/src/components/block-list/block.js index a18d1b4e68b025..a78254858437e2 100644 --- a/packages/block-editor/src/components/block-list/block.js +++ b/packages/block-editor/src/components/block-list/block.js @@ -139,7 +139,7 @@ function BlockListBlock( { // For aligned blocks, provide a wrapper element so the block can be // positioned relative to the block column. This is enabled with the // .is-block-content className. - if ( isAligned ) { + if ( ! lightBlockWrapper && isAligned ) { blockEdit =
{ blockEdit }
; } @@ -163,6 +163,7 @@ function BlockListBlock( { name, mode, blockTitle: blockType.title, + wrapperProps, }; const memoizedValue = useMemo( () => value, Object.values( value ) ); diff --git a/packages/block-library/src/columns/editor.scss b/packages/block-library/src/columns/editor.scss index 03dc213674ef1d..3f0196e4516899 100644 --- a/packages/block-library/src/columns/editor.scss +++ b/packages/block-library/src/columns/editor.scss @@ -4,11 +4,6 @@ max-width: none; } -// It needs to be investigated which of these removed styles remain applicable -// in the editor, but the removal of all the wrapper containers should -// significantly reduce the amount of corrections needed. The front-end styles -// should ideally be enough. - // Ideally this shouldn't be necessary. There should be no default margins in // the editor. .editor-styles-wrapper .block-editor-block-list__block.wp-block-column,