diff --git a/packages/block-library/src/template-part/editor.scss b/packages/block-library/src/template-part/editor.scss index cfdf9b310fd8ad..af52ef32a67721 100644 --- a/packages/block-library/src/template-part/editor.scss +++ b/packages/block-library/src/template-part/editor.scss @@ -89,3 +89,18 @@ box-shadow: 0 0 0 $border-width var(--wp-admin-theme-color); } } + +// Ensures a border is present when a child block is selected. +.block-editor-block-list__block[data-type="core/template-part"] { + &.is-selected, + &.has-child-selected { + &::after { + top: $border-width; + bottom: $border-width; + left: $border-width; + right: $border-width; + border-radius: $radius-block-ui - $border-width; // Border is outset, so so subtract the width to achieve correct radius. + box-shadow: 0 0 0 $border-width $gray-900; + } + } +}