From 91cb16c94c424d3155bb1c2849d4eb98002c12a1 Mon Sep 17 00:00:00 2001 From: Joen Asmussen Date: Fri, 19 Jan 2018 09:47:32 +0100 Subject: [PATCH 1/2] Try new icons for movers These icons are smaller and less obtrusive, which makes them less heavy to look at. This PR also employs a workaround to achieve the effect that `:focusring` would, were it implemented (see https://www.youtube.com/watch?v=ilj2P5-5CjI). This is applied only to the mover icons. GIF: https://cldup.com/5lyhf0iSTp.gif --- editor/components/block-mover/index.js | 4 ++-- editor/components/block-mover/style.scss | 21 ++++++++++++++++++--- 2 files changed, 20 insertions(+), 5 deletions(-) diff --git a/editor/components/block-mover/index.js b/editor/components/block-mover/index.js index 9c2d8964f41e70..3110a34ef0e73b 100644 --- a/editor/components/block-mover/index.js +++ b/editor/components/block-mover/index.js @@ -34,7 +34,7 @@ export function BlockMover( { onMoveUp, onMoveDown, isFirst, isLast, uids, block } tooltip={ __( 'Move Up' ) } label={ getBlockMoverLabel( uids.length, @@ -49,7 +49,7 @@ export function BlockMover( { onMoveUp, onMoveDown, isFirst, isLast, uids, block } tooltip={ __( 'Move Down' ) } label={ getBlockMoverLabel( uids.length, diff --git a/editor/components/block-mover/style.scss b/editor/components/block-mover/style.scss index 964b96d7bc6c00..e7c001ae04a9ef 100644 --- a/editor/components/block-mover/style.scss +++ b/editor/components/block-mover/style.scss @@ -20,15 +20,30 @@ margin-bottom: 4px; } - &:not(:disabled):hover { + // unstyle inherited icon button styles + &:not(:disabled):hover, + &:not(:disabled):active, + &:not(:disabled):focus { + box-shadow: none; + color: inherit; + } + + // apply styles to SVG directly + svg { + display: block; + position: relative; // Fixing the Safari bug for `