Skip to content

Commit

Permalink
Add a delay to the block type label on hover (#9197)
Browse files Browse the repository at this point in the history
* Adding a delay to block hover animations.

When a user mouses over a block, they're currently presented with a dark blue outline and text label. This can be jarring, and add to a feeling of Gutenberg being "heavy" with its UI. This PR explores replacing that blue outline with a light gray outline initially, and introducing the blue outline and label after a short delay.

* Adding an outline color delay to the page header.

* Reinstating the blue outline hover state.

* Speed up the fade-in animation for the block label.
  • Loading branch information
kjellr authored and gziolo committed Aug 30, 2018
1 parent ce24e74 commit 346bdec
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
4 changes: 2 additions & 2 deletions edit-post/assets/stylesheets/_animations.scss
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@
animation: slide_in_right 0.1s forwards;
}

@mixin fade_in($speed: 0.2s) {
animation: fade-in $speed ease-out;
@mixin fade_in($speed: 0.2s, $delay: 0s) {
animation: fade-in $speed ease-out $delay;
animation-fill-mode: forwards;
}

Expand Down
3 changes: 2 additions & 1 deletion packages/editor/src/components/block-list/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -1004,7 +1004,8 @@

// Animate in
.editor-block-list__block:hover & {
@include fade_in(0.1s);
opacity: 0;
@include fade_in(60ms, 0.5s);
}
}
}
Expand Down

0 comments on commit 346bdec

Please sign in to comment.