From a309b1271258b9ef2a2924bf36085936f16e1726 Mon Sep 17 00:00:00 2001 From: jasmussen Date: Wed, 10 Feb 2021 09:42:23 +0100 Subject: [PATCH] Fix: More resilient appender CSS. --- .../src/components/block-list-appender/style.scss | 3 ++- packages/block-library/src/navigation-link/editor.scss | 7 ++++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/packages/block-editor/src/components/block-list-appender/style.scss b/packages/block-editor/src/components/block-list-appender/style.scss index 735f6c590d2b69..53f98d03a12ac7 100644 --- a/packages/block-editor/src/components/block-list-appender/style.scss +++ b/packages/block-editor/src/components/block-list-appender/style.scss @@ -6,7 +6,8 @@ list-style: none; // Add a little left margin when used horizontally. - margin: 0 0 0 $grid-unit-10; + // The right margin should be set to auto, so as to not shift layout in flex containers. + margin: 0 auto 0 $grid-unit-10; // ... unless it's the only child. &:first-child { diff --git a/packages/block-library/src/navigation-link/editor.scss b/packages/block-library/src/navigation-link/editor.scss index 9e24f48dde9de9..d8eaf9e1d2aafd 100644 --- a/packages/block-library/src/navigation-link/editor.scss +++ b/packages/block-library/src/navigation-link/editor.scss @@ -25,10 +25,11 @@ } .block-list-appender { - margin: $grid-unit-10 * 2; - margin-left: $grid-unit-10 * 1.25; - margin-top: $grid-unit-10 * 1.25; + margin-top: $grid-unit-20; + // The right margin should be set to auto, so as to not shift layout in flex containers. margin-right: auto; + margin-bottom: $grid-unit-20; + margin-left: $grid-unit-20; } }