From d8cc9a894e1571c27ae3170bb2b38c02d223b005 Mon Sep 17 00:00:00 2001 From: Ella <4710635+ellatrix@users.noreply.github.com> Date: Thu, 31 Oct 2024 16:07:38 +0100 Subject: [PATCH] Appender: fix outside-canvas styles (#66630) Co-authored-by: ellatrix Co-authored-by: jasmussen Co-authored-by: stokesman --- .../src/components/block-tools/style.scss | 13 ++++++++++ .../default-block-appender/content.scss | 24 +++++++------------ 2 files changed, 21 insertions(+), 16 deletions(-) diff --git a/packages/block-editor/src/components/block-tools/style.scss b/packages/block-editor/src/components/block-tools/style.scss index 0791dc909d5be4..66a711454eb798 100644 --- a/packages/block-editor/src/components/block-tools/style.scss +++ b/packages/block-editor/src/components/block-tools/style.scss @@ -57,6 +57,19 @@ } } +// The black plus that shows up on the right side of an empty paragraph block, +// or the initial appender that exists only on empty documents. +.block-editor-block-list__empty-block-inserter.block-editor-block-list__empty-block-inserter { + position: absolute; + top: 0; + right: 0; + line-height: 0; + + &:disabled { + display: none; + } +} + // Sibling inserter / "inbetweenserter". .block-editor-block-list__empty-block-inserter, .block-editor-block-list__insertion-point-inserter { diff --git a/packages/block-editor/src/components/default-block-appender/content.scss b/packages/block-editor/src/components/default-block-appender/content.scss index 51e0b4381a15d5..3a1bf9889d7481 100644 --- a/packages/block-editor/src/components/default-block-appender/content.scss +++ b/packages/block-editor/src/components/default-block-appender/content.scss @@ -62,24 +62,12 @@ } } -// The black plus that shows up on the right side of an empty paragraph block, or the initial appender -// that exists only on empty documents. -.block-editor-block-list__empty-block-inserter.block-editor-block-list__empty-block-inserter, -.block-editor-default-block-appender .block-editor-inserter { - position: absolute; - top: 0; - right: 0; - line-height: 0; - - &:disabled { - display: none; - } -} - /** - * Fixed position appender. - * These styles apply to all in-canvas inserters that exist inside nesting containers. + * Fixed position appender (right bottom corner). + * + * These styles apply to all in-canvas inserters. All in-canvas inserters always + * exist within a block. */ .block-editor-block-list__block .block-list-appender { @@ -96,6 +84,10 @@ line-height: 0; } + .block-editor-inserter:disabled { + display: none; + } + .block-editor-default-block-appender { height: $button-size-small; }