From 3f7b4eb760326892c0b17b69c91e3c7ccdc6fdf0 Mon Sep 17 00:00:00 2001 From: Copons Date: Thu, 11 Mar 2021 16:54:36 +0000 Subject: [PATCH] Code cleanup --- .../src/components/block-list/style.scss | 1 - .../components/block-navigation/style.scss | 22 ++++++++++--------- 2 files changed, 12 insertions(+), 11 deletions(-) diff --git a/packages/block-editor/src/components/block-list/style.scss b/packages/block-editor/src/components/block-list/style.scss index 3aa45271069f75..6ae482f9907747 100644 --- a/packages/block-editor/src/components/block-list/style.scss +++ b/packages/block-editor/src/components/block-list/style.scss @@ -61,7 +61,6 @@ right: $border-width; // Everything else. - // 2px outside. box-shadow: 0 0 0 $border-width $gray-900; border-radius: $radius-block-ui - $border-width; // Border is outset, so subtract the width to achieve correct radius. diff --git a/packages/block-editor/src/components/block-navigation/style.scss b/packages/block-editor/src/components/block-navigation/style.scss index d0556b1391fa24..c6b28efd67699d 100644 --- a/packages/block-editor/src/components/block-navigation/style.scss +++ b/packages/block-editor/src/components/block-navigation/style.scss @@ -28,6 +28,14 @@ color: $white; } + &.is-branch-selected.is-selected .block-editor-block-navigation-block-contents { + border-radius: 2px 2px 0 0; + } + &.is-branch-selected:not(.is-selected) .block-editor-block-navigation-block-contents { + background: $gray-100; + border-radius: 0; + } + &.is-dragging { display: none; } @@ -45,10 +53,13 @@ white-space: nowrap; &:hover { - background: $gray-100; + box-shadow: inset 0 0 0 $border-width $gray-900; } &:focus { + box-shadow: + inset 0 0 0 1px $white, + 0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color); z-index: 1; } @@ -233,12 +244,3 @@ flex-shrink: 0; width: 18px; } - -// EXPERIMENTAL -tr.block-editor-block-navigation-leaf { - &.is-selected .block-editor-block-navigation-block-contents { - &:focus { - box-shadow: inset 0 0 0 1px $white, 0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color); - } - } -}