diff --git a/packages/block-library/src/editor.scss b/packages/block-library/src/editor.scss index 03155978ee7647..70aa75c35b7f05 100644 --- a/packages/block-library/src/editor.scss +++ b/packages/block-library/src/editor.scss @@ -15,7 +15,6 @@ @import "./latest-comments/editor.scss"; @import "./latest-posts/editor.scss"; @import "./list/editor.scss"; -@import "./missing/editor.scss"; @import "./more/editor.scss"; @import "./nextpage/editor.scss"; @import "./preformatted/editor.scss"; diff --git a/packages/block-library/src/missing/editor.scss b/packages/block-library/src/missing/editor.scss deleted file mode 100644 index 0223c73c9463c3..00000000000000 --- a/packages/block-library/src/missing/editor.scss +++ /dev/null @@ -1,21 +0,0 @@ -.editor-block-list__block[data-type="core/missing"] { - .editor-warning { - position: static; - } - - &, - &.is-selected, - &.is-hovered { - // Remove the block outline because design requested that this - // feel less like a first-class block and more like an error message. - > .editor-block-list__block-edit::before { - outline: none; - } - - // Remove the block breadcrumb because design requested that this - // feel less like a first-class block and more like an error message. - .editor-block-list__breadcrumb { - display: none; - } - } -} diff --git a/packages/editor/src/components/block-list/block.js b/packages/editor/src/components/block-list/block.js index c70c7faeba47a9..f415d8b79ff940 100644 --- a/packages/editor/src/components/block-list/block.js +++ b/packages/editor/src/components/block-list/block.js @@ -21,6 +21,7 @@ import { getSaveElement, isReusableBlock, isUnmodifiedDefaultBlock, + getUnregisteredTypeHandlerName, } from '@wordpress/blocks'; import { withFilters } from '@wordpress/components'; import { __, sprintf } from '@wordpress/i18n'; @@ -382,6 +383,8 @@ export class BlockListBlock extends Component { // The block as rendered in the editor is composed of general block UI // (mover, toolbar, wrapper) and the display of the block content. + const isUnregisteredBlock = block.name === getUnregisteredTypeHandlerName(); + // If the block is selected and we're typing the block should not appear. // Empty paragraph blocks should always show up as unselected. const showEmptyBlockSideInserter = ( isSelected || isHovered ) && isEmptyDefaultBlock && isValid; @@ -404,7 +407,7 @@ export class BlockListBlock extends Component { // Generate the wrapper class names handling the different states of the block. const wrapperClassName = classnames( 'editor-block-list__block', { - 'has-warning': ! isValid || !! error, + 'has-warning': ! isValid || !! error || isUnregisteredBlock, 'is-selected': shouldAppearSelected, 'is-multi-selected': isPartOfMultiSelection, 'is-selected-parent': shouldAppearSelectedParent,