From fecf3d24bf137733088867f5e0982b7a942373fb Mon Sep 17 00:00:00 2001 From: Joen A <1204802+jasmussen@users.noreply.github.com> Date: Tue, 11 Oct 2022 11:43:32 +0200 Subject: [PATCH] Placeholder: Fix hover style. (#44701) * Placeholder: Fix hover style. * Enable clicking "Start blank". --- .../src/components/block-list/style.scss | 14 ++++++++++++-- packages/components/src/placeholder/style.scss | 3 +++ 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/packages/block-editor/src/components/block-list/style.scss b/packages/block-editor/src/components/block-list/style.scss index 15c0a28bcb4ff..2f0b0e6c9519a 100644 --- a/packages/block-editor/src/components/block-list/style.scss +++ b/packages/block-editor/src/components/block-list/style.scss @@ -264,8 +264,18 @@ .is-outline-mode .block-editor-block-list__block:not(.remove-outline) { &.is-hovered { cursor: default; - box-shadow: inset 0 0 0 $border-width var(--wp-admin-theme-color); - border-radius: $radius-block-ui; + + &::after { + content: ""; + position: absolute; + pointer-events: none; + top: $border-width; + left: $border-width; + right: $border-width; + bottom: $border-width; + box-shadow: 0 0 0 $border-width var(--wp-admin-theme-color); + border-radius: $radius-block-ui - $border-width; + } } &.is-selected { diff --git a/packages/components/src/placeholder/style.scss b/packages/components/src/placeholder/style.scss index 5edcb2dae3e6f..9f5db03711dc7 100644 --- a/packages/components/src/placeholder/style.scss +++ b/packages/components/src/placeholder/style.scss @@ -182,6 +182,9 @@ backdrop-filter: blur(100px); background-color: transparent; + // This appears to fix an occasional Chrome bug where the blurred background would have an incorrect color. + backface-visibility: hidden; + // Invert the colors in themes deemed dark. .is-dark-theme & { background-color: rgba($black, 0.1);