Skip to content

Commit

Permalink
Align block hover and select styles across list view, site editor, se…
Browse files Browse the repository at this point in the history
…lect mode (#31277)

* Align block hover styles across list view, site editor, select mode

* Undo the inversion

* Outline width for selected + focussed blocks
  • Loading branch information
jameskoster authored Jun 2, 2021
1 parent 6054459 commit cba8fec
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions packages/block-editor/src/components/block-list/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -62,10 +62,14 @@
}

&.is-navigate-mode .block-editor-block-list__block.is-hovered:not(.is-selected)::after {
box-shadow: 0 0 0 1px $gray-600;
box-shadow: 0 0 0 $border-width var(--wp-admin-theme-color);
}

.block-editor-block-list__block.is-highlighted::after {
box-shadow: 0 0 0 $border-width var(--wp-admin-theme-color);
outline: $border-width solid transparent;
}

.block-editor-block-list__block.is-highlighted::after,
.block-editor-block-list__block.is-multi-selected::after,
&.is-navigate-mode .block-editor-block-list__block.is-selected::after,
& .is-block-moving-mode.block-editor-block-list__block.has-child-selected {
Expand Down Expand Up @@ -275,7 +279,7 @@
cursor: unset;

&::after {
box-shadow: 0 0 0 $border-width var(--wp-admin-theme-color); // Selected not focussed.
box-shadow: 0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color); // Selected not focussed.
top: $border-width;
left: $border-width;
right: $border-width;
Expand Down

0 comments on commit cba8fec

Please sign in to comment.