diff --git a/packages/block-editor/src/components/block-content-overlay/style.scss b/packages/block-editor/src/components/block-content-overlay/style.scss index 0bd9bb3f9ef5f..b70431979111a 100644 --- a/packages/block-editor/src/components/block-content-overlay/style.scss +++ b/packages/block-editor/src/components/block-content-overlay/style.scss @@ -1,7 +1,7 @@ .block-editor-block-list__block.has-block-overlay { cursor: default; - &::before { + &::after { content: ""; position: absolute; top: 0; @@ -14,7 +14,7 @@ z-index: z-index(".block-editor-block-list__block.has-block-overlay"); } - &:hover:not(.is-dragging-blocks)::before { + &:hover:not(.is-dragging-blocks)::after { background: rgba(var(--wp-admin-theme-color--rgb), 0.1); box-shadow: 0 0 0 $border-width var(--wp-admin-theme-color) inset; } @@ -22,4 +22,11 @@ .block-editor-block-list__block { pointer-events: none; } + + .block-editor-iframe__body.is-zoomed-out &::after { + // Unfortunately because of the vw unit, this is not always going to be exact + // When the scrollbar is visible, the frame exceeds the canvas by a few pixes. + width: calc(100vw); + left: calc(( 100% - 100vw ) / 2); + } }