Skip to content

Commit

Permalink
Polish region focus style (#7459)
Browse files Browse the repository at this point in the history
* Polish region focus style

This is a small ✋ Friday PR! 🤚

It does one thing — adds a little animation flourish to the focus style we show when you navigate between regions. Press Ctrl + [the key below escape] to invoke this. Here's how it looks:

* Address feedback.
  • Loading branch information
jasmussen committed Jun 22, 2018
1 parent e6d435f commit c4b1362
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 1 deletion.
3 changes: 2 additions & 1 deletion components/higher-order/navigate-regions/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
left: 0;
right: 0;
pointer-events: none;
border: 4px solid $blue-medium-400;
outline: 4px solid transparent; // Shown in Windows High Contrast mode.
@include region_focus( .1s );
}
}
14 changes: 14 additions & 0 deletions edit-post/assets/stylesheets/_animations.scss
Original file line number Diff line number Diff line change
Expand Up @@ -30,3 +30,17 @@
animation: fade-in $speed ease-out;
animation-fill-mode: forwards;
}

@keyframes editor_region_focus {
from {
box-shadow: inset 0 0 0 0 $blue-medium-400;
}
to {
box-shadow: inset 0 0 0 4px $blue-medium-400;
}
}

@mixin region_focus( $speed: 0.2s ) {
animation: editor_region_focus $speed ease-out;
animation-fill-mode: forwards;
}

0 comments on commit c4b1362

Please sign in to comment.