diff --git a/assets/stylesheets/_z-index.scss b/assets/stylesheets/_z-index.scss index 12f9b16de20037..7007e7e61e354f 100644 --- a/assets/stylesheets/_z-index.scss +++ b/assets/stylesheets/_z-index.scss @@ -8,7 +8,6 @@ $z-layers: ( ".block-editor-block-list__block {core/image aligned wide or fullwide}": 20, ".block-library-classic__toolbar": 10, ".block-editor-block-list__layout .reusable-block-indicator": 1, - ".block-editor-block-list__breadcrumb": 2, ".components-form-toggle__input": 1, ".components-panel__header.edit-post-sidebar__panel-tabs": -1, ".edit-post-sidebar .components-panel": -2, @@ -59,7 +58,6 @@ $z-layers: ( // The toolbar, when contextual, should be above any adjacent nested block click overlays. ".block-editor-block-list__layout .reusable-block-edit-panel": 121, ".block-editor-block-contextual-toolbar": 121, - ".editor-inner-blocks .block-editor-block-list__breadcrumb": 122, // The block mover, particularly in nested contexts, // should overlap most block content. diff --git a/packages/block-editor/src/components/block-list/block.js b/packages/block-editor/src/components/block-list/block.js index 320f63555946c8..1ae0e549929fba 100644 --- a/packages/block-editor/src/components/block-list/block.js +++ b/packages/block-editor/src/components/block-list/block.js @@ -41,7 +41,6 @@ import BlockInvalidWarning from './block-invalid-warning'; import BlockCrashWarning from './block-crash-warning'; import BlockCrashBoundary from './block-crash-boundary'; import BlockHtml from './block-html'; -import BlockBreadcrumb from './breadcrumb'; import BlockContextualToolbar from './block-contextual-toolbar'; import BlockMultiControls from './multi-controls'; import BlockMobileToolbar from './block-mobile-toolbar'; @@ -372,8 +371,6 @@ function BlockListBlock( { ! showEmptyBlockSideInserter && ! isPartOfMultiSelection && ! isTypingWithinBlock; - const shouldShowBreadcrumb = - ! isFocusMode && isHovered && ! isEmptyDefaultBlock; const shouldShowContextualToolbar = ! hasFixedToolbar && ! showEmptyBlockSideInserter && @@ -496,14 +493,6 @@ function BlockListBlock( { onDragEnd={ onDragEnd } /> ) } - { shouldShowBreadcrumb && ( - - ) } { ( shouldShowContextualToolbar || isForcingContextualToolbar.current ) && ( - - { rootClientId && ( - <> - - - - ) } - - - - ); - } -} - -export default compose( [ - withSelect( ( select, ownProps ) => { - const { getBlockRootClientId } = select( 'core/block-editor' ); - const { clientId } = ownProps; - - return { - rootClientId: getBlockRootClientId( clientId ), - }; - } ), -] )( BlockBreadcrumb ); diff --git a/packages/block-editor/src/components/block-list/style.scss b/packages/block-editor/src/components/block-list/style.scss index 9897ea51d63012..1bce6a5631b160 100644 --- a/packages/block-editor/src/components/block-list/style.scss +++ b/packages/block-editor/src/components/block-list/style.scss @@ -447,11 +447,6 @@ } } - // If the block movers are visible, push the breadcrumb down to make room for them. - .block-editor-block-mover.is-visible + .block-editor-block-list__breadcrumb { - top: (-$block-padding - $block-left-border-width - ($grid-size-small / 2)); - } - // Align block toolbar to floated content. @include break-mobile() { .block-editor-block-toolbar { @@ -481,10 +476,6 @@ // Full-wide &[data-align="full"] { - // Position hover label on the left for the top level block. - > .block-editor-block-list__block-edit > .block-editor-block-list__breadcrumb { - left: 0; - } // Compensate for main container padding and subtract border. @include break-small() { @@ -988,58 +979,6 @@ } } - -/** - * Hover label - */ - -.block-editor-block-list__breadcrumb { - position: absolute; - line-height: 1; - z-index: z-index(".block-editor-block-list__breadcrumb"); - - // Position in the top left of the border. - left: -$block-padding - $block-left-border-width; - top: (($block-padding * -2) - $block-left-border-width); - - .components-toolbar { - border: none; - line-height: 1; - font-family: $default-font; - font-size: 11px; - padding: 4px 4px; - background: $light-gray-500; - color: $dark-gray-900; - - .is-dark-theme & { - background: $dark-gray-600; - color: $white; - } - - // Animate in - .block-editor-block-list__block:hover & { - opacity: 0; - @include edit-post__fade-in-animation(60ms, 0.5s); - } - } - - // Position this above the toolbar of parent blocks. - .editor-inner-blocks & { - z-index: z-index(".editor-inner-blocks .block-editor-block-list__breadcrumb"); - } - - // Remove negative left breadcrumb position for left aligned blocks. - [data-align="left"] & { - left: 0; - } - - // Right-align the breadcrumb for right-aligned blocks. - [data-align="right"] & { - left: auto; - right: 0; - } -} - .block-editor-block-list__descendant-arrow::before { content: "→"; display: inline-block; diff --git a/packages/block-library/src/classic/editor.scss b/packages/block-library/src/classic/editor.scss index 3d4965146dcf2e..41c4bd815c3048 100644 --- a/packages/block-library/src/classic/editor.scss +++ b/packages/block-library/src/classic/editor.scss @@ -254,11 +254,6 @@ div[data-type="core/freeform"] { border-left-color: transparent; } - // Don't show block type label for classic block - &.is-hovered .block-editor-block-list__breadcrumb { - display: none; - } - .editor-block-contextual-toolbar + div { margin-top: 0; padding-top: 0; diff --git a/packages/block-library/src/columns/editor.scss b/packages/block-library/src/columns/editor.scss index 6e9e2e60659114..4ffd18a4a99afc 100644 --- a/packages/block-library/src/columns/editor.scss +++ b/packages/block-library/src/columns/editor.scss @@ -158,15 +158,6 @@ div.block-core-columns.is-vertically-aligned-bottom { justify-content: flex-end; } - -/** - * Fixes single Column breadcrumb to RHS of Block boundary - */ -[data-type="core/column"] > .editor-block-list__block-edit > .editor-block-list__breadcrumb { - right: 0; - left: auto; -} - /** * Make single Column overlay not extend past boundaries of parent */