From 73d7e2240db2fa4be7b9b8346660c3478a954f30 Mon Sep 17 00:00:00 2001 From: Joen A <1204802+jasmussen@users.noreply.github.com> Date: Wed, 4 Nov 2020 20:57:43 +0100 Subject: [PATCH] Movers: Small positioning refactor. (#26353) --- .../src/components/block-list/style.scss | 12 ------------ .../src/components/block-mover/style.scss | 11 +++++++++-- 2 files changed, 9 insertions(+), 14 deletions(-) diff --git a/packages/block-editor/src/components/block-list/style.scss b/packages/block-editor/src/components/block-list/style.scss index 8973995abec19..5e9f7fb06b46b 100644 --- a/packages/block-editor/src/components/block-list/style.scss +++ b/packages/block-editor/src/components/block-list/style.scss @@ -550,18 +550,6 @@ .block-editor-block-mover:not(.is-horizontal) { // Position SVGs. .block-editor-block-mover-button { - &.is-up-button { - svg { - margin-top: 2px; - } - } - - &.is-down-button { - svg { - margin-bottom: 3px; - } - } - &:focus::before { left: 0 !important; min-width: 0; diff --git a/packages/block-editor/src/components/block-mover/style.scss b/packages/block-editor/src/components/block-mover/style.scss index a84a28cf4a9c3..9cb0b2ea89f51 100644 --- a/packages/block-editor/src/components/block-mover/style.scss +++ b/packages/block-editor/src/components/block-mover/style.scss @@ -64,10 +64,16 @@ // Position the icons correctly. @include break-small() { + .components-toolbar-group .block-editor-block-mover-button, + .components-toolbar .block-editor-block-mover-button { + margin: 0 auto 0 0; + } + + // Up button. .components-toolbar-group .block-editor-block-mover-button.is-up-button, .components-toolbar .block-editor-block-mover-button.is-up-button { svg { - margin-bottom: -$grid-unit-10; + top: 5px; } // Focus style. @@ -77,10 +83,11 @@ } } + // Down button. .components-toolbar-group .block-editor-block-mover-button.is-down-button, .components-toolbar .block-editor-block-mover-button.is-down-button { svg { - margin-top: -$grid-unit-10; + bottom: 5px; } // Focus style.