From e013c4c8a0a15e786f5306fc6c20beef9be4c7f3 Mon Sep 17 00:00:00 2001 From: jasmussen Date: Wed, 5 Oct 2022 11:17:32 +0200 Subject: [PATCH] Placeholder: Fix hover style. --- .../src/components/block-list/style.scss | 13 +++++++++++-- packages/components/src/placeholder/style.scss | 3 +++ 2 files changed, 14 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 15c0a28bcb4ffc..a9a1e7824c3335 100644 --- a/packages/block-editor/src/components/block-list/style.scss +++ b/packages/block-editor/src/components/block-list/style.scss @@ -264,8 +264,17 @@ .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; + 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 5edcb2dae3e6f3..9f5db03711dc7e 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);