Skip to content

Commit

Permalink
Remove obsolete editor alignment classes (#21906)
Browse files Browse the repository at this point in the history
* Remove obsolete editor alignment classes

* Forgot to save
  • Loading branch information
ellatrix authored Apr 27, 2020
1 parent 4fdf91e commit 65d907a
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -111,11 +111,6 @@ function BlockPopover( {
return null;
}

// A block may specify a different target element for the toolbar.
if ( node.classList.contains( 'is-block-collapsed' ) ) {
node = node.querySelector( '.is-block-content' ) || node;
}

let anchorRef = node;

if ( hasMultiSelection ) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -230,8 +230,7 @@ const BlockComponent = forwardRef(
);

// 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.
// positioned relative to the block column.
if ( isAligned ) {
const alignmentWrapperProps = {
'data-align': wrapperProps[ 'data-align' ],
Expand Down
2 changes: 0 additions & 2 deletions packages/block-editor/src/components/block-list/block.js
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,6 @@ function BlockListBlock( {
};
}

const isAligned = wrapperProps && wrapperProps[ 'data-align' ];
const generatedClassName =
lightBlockWrapper && hasBlockSupport( blockType, 'className', true )
? getBlockDefaultClassName( name )
Expand All @@ -120,7 +119,6 @@ function BlockListBlock( {
isFocusMode && ( isSelected || isAncestorOfSelectedBlock ),
'is-focus-mode': isFocusMode,
'has-child-selected': isAncestorOfSelectedBlock,
'is-block-collapsed': isAligned,
},
className
);
Expand Down
6 changes: 0 additions & 6 deletions packages/block-editor/src/components/block-list/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -161,12 +161,6 @@
}
}
}

// Hide the focus indicator for collapsed blocks.
// These serve as only as column containers for floated blocks.
.block-editor-block-list__block.is-block-collapsed::after {
content: none;
}
}


Expand Down

0 comments on commit 65d907a

Please sign in to comment.