diff --git a/packages/block-library/src/template-part/editor.scss b/packages/block-library/src/template-part/editor.scss index b58a859c91573..02ba2bac567fd 100644 --- a/packages/block-library/src/template-part/editor.scss +++ b/packages/block-library/src/template-part/editor.scss @@ -92,6 +92,7 @@ // 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; @@ -99,11 +100,27 @@ 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 var(--wp-admin-theme-color); + } + } + &.is-selected { + &::after { + // 2px outside. + box-shadow: 0 0 0 $border-width-focus var(--wp-admin-theme-color); + // Show a light color for dark themes. .is-dark-theme & { box-shadow: 0 0 0 $border-width-focus $dark-theme-focus; } } } + + &.has-child-selected { + &::after { + box-shadow: 0 0 0 $border-width var(--wp-admin-theme-color); + + .is-dark-theme & { + box-shadow: 0 0 0 $border-width $dark-theme-focus; + } + } + } }