From 5e77f46d2955749057e423001643a67daff54cc3 Mon Sep 17 00:00:00 2001 From: Joen A <1204802+jasmussen@users.noreply.github.com> Date: Mon, 7 Sep 2020 13:17:08 +0200 Subject: [PATCH] Polish menu item icon locations. (#25106) * Polish media replace menu. * Polish transforms menu. --- .../components/block-switcher/block-transformations-menu.js | 2 +- .../src/components/media-replace-flow/style.scss | 6 +++++- packages/components/src/menu-item/style.scss | 6 ++++++ packages/icons/src/library/media.js | 4 ++-- 4 files changed, 14 insertions(+), 4 deletions(-) diff --git a/packages/block-editor/src/components/block-switcher/block-transformations-menu.js b/packages/block-editor/src/components/block-switcher/block-transformations-menu.js index d01663a41bd2d1..fb70c053dac781 100644 --- a/packages/block-editor/src/components/block-switcher/block-transformations-menu.js +++ b/packages/block-editor/src/components/block-switcher/block-transformations-menu.js @@ -23,12 +23,12 @@ const BlockTransformationsMenu = ( { } onClick={ ( event ) => { event.preventDefault(); onSelect( name ); } } > + { title } ); diff --git a/packages/block-editor/src/components/media-replace-flow/style.scss b/packages/block-editor/src/components/media-replace-flow/style.scss index 97ca140a75328c..7af0f7bfbd2fce 100644 --- a/packages/block-editor/src/components/media-replace-flow/style.scss +++ b/packages/block-editor/src/components/media-replace-flow/style.scss @@ -16,7 +16,11 @@ } .block-editor-media-flow__url-input { - margin-top: $grid-unit-20; + border-top: $border-width solid $gray-900; + margin-top: $grid-unit-15; + margin-right: -$grid-unit-15; + margin-left: -$grid-unit-15; + padding: $grid-unit-15 $grid-unit-30 0; .block-editor-media-replace-flow__image-url-label { top: $grid-unit-20; diff --git a/packages/components/src/menu-item/style.scss b/packages/components/src/menu-item/style.scss index 29aa0570d28a3b..d490d77fd6a823 100644 --- a/packages/components/src/menu-item/style.scss +++ b/packages/components/src/menu-item/style.scss @@ -12,6 +12,12 @@ .components-menu-item__shortcut + .components-menu-items__item-icon { margin-left: $grid-unit-10; } + + // If a block item is shown inline (such as transforms), space it correctly. + .block-editor-block-icon { + margin-left: -2px; // This optically balances the icon. + margin-right: $grid-unit-10; + } } .components-menu-item__info-wrapper { diff --git a/packages/icons/src/library/media.js b/packages/icons/src/library/media.js index b91d820cc8317e..23b1b1f7ecd527 100644 --- a/packages/icons/src/library/media.js +++ b/packages/icons/src/library/media.js @@ -4,8 +4,8 @@ import { SVG, Path } from '@wordpress/primitives'; const media = ( - - + + );