Skip to content

Commit

Permalink
Site editor outlines: try subtle outlines on block hover
Browse files Browse the repository at this point in the history
  • Loading branch information
jasmussen committed Oct 7, 2022
1 parent f5f3d8d commit eef0496
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
@keyframes click-overlay__fade-in-animation {
from {
opacity: 0;
}
to {
opacity: 1;
}
}

.block-editor-block-list__block.has-block-overlay {
cursor: default;

Expand All @@ -21,6 +30,11 @@
&:hover:not(.is-dragging-blocks)::before {
background: rgba(var(--wp-admin-theme-color--rgb), 0.3);
box-shadow: 0 0 0 $border-width var(--wp-admin-theme-color) inset;

// Animate.
animation: click-overlay__fade-in-animation 0.1s ease-out;
animation-fill-mode: forwards;
@include reduce-motion("animation");
}

&.is-selected:not(.is-dragging-blocks)::before {
Expand Down
2 changes: 1 addition & 1 deletion packages/block-editor/src/components/block-list/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@
.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);
box-shadow: inset 0 0 0 0.5px currentColor;
border-radius: $radius-block-ui;
}

Expand Down

0 comments on commit eef0496

Please sign in to comment.