Skip to content

Commit

Permalink
Fix alignment styles
Browse files Browse the repository at this point in the history
  • Loading branch information
ellatrix committed Feb 28, 2020
1 parent 4981a35 commit 90f33cf
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ const BlockComponent = forwardRef(
name,
mode,
blockTitle,
wrapperProps,
} = useContext( BlockContext );
const { initialPosition } = useSelect(
( select ) => {
Expand Down Expand Up @@ -203,6 +204,7 @@ const BlockComponent = forwardRef(
// Overrideable props.
aria-label={ blockLabel }
role="group"
{ ...wrapperProps }
{ ...props }
id={ blockElementId }
ref={ wrapper }
Expand Down
3 changes: 2 additions & 1 deletion packages/block-editor/src/components/block-list/block.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 = <div className="is-block-content">{ blockEdit }</div>;
}

Expand All @@ -163,6 +163,7 @@ function BlockListBlock( {
name,
mode,
blockTitle: blockType.title,
wrapperProps,
};
const memoizedValue = useMemo( () => value, Object.values( value ) );

Expand Down
5 changes: 0 additions & 5 deletions packages/block-library/src/columns/editor.scss
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 90f33cf

Please sign in to comment.