Skip to content

Commit

Permalink
fix unwanted centering, show regular toolbars on non full width blocks
Browse files Browse the repository at this point in the history
  • Loading branch information
MaggieCabrera committed Jul 19, 2024
1 parent aa23f0c commit 25ea88e
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,14 @@ export function useShowBlockTools() {
! hasMultiSelection() &&
editorMode === 'navigation';

const _showZoomOutToolbar =
editorMode === 'zoom-out' &&
block?.attributes?.align === 'full' &&
! _showEmptyBlockSideInserter &&
! maybeShowBreadcrumb;

const _showBlockToolbarPopover =
editorMode !== 'zoom-out' &&
! _showZoomOutToolbar &&
! getSettings().hasFixedToolbar &&
! _showEmptyBlockSideInserter &&
hasSelectedBlock &&
Expand All @@ -56,12 +62,7 @@ export function useShowBlockTools() {
showBreadcrumb:
! _showEmptyBlockSideInserter && maybeShowBreadcrumb,
showBlockToolbarPopover: _showBlockToolbarPopover,
showZoomOutToolbar:
editorMode === 'zoom-out' &&
block?.attributes?.align === 'full' &&
! _showEmptyBlockSideInserter &&
! maybeShowBreadcrumb &&
! _showBlockToolbarPopover,
showZoomOutToolbar: _showZoomOutToolbar,
};
}, [] );
}
2 changes: 1 addition & 1 deletion packages/block-editor/src/components/iframe/content.scss
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
display: flex;
flex-direction: column;

> .is-root-container {
> .is-root-container:not(.wp-block-post-content) {
flex: 1;
display: flex;
flex-direction: column;
Expand Down

0 comments on commit 25ea88e

Please sign in to comment.