From 031c06920fc4796d5f4985052533bbb0a2bc5c6e Mon Sep 17 00:00:00 2001 From: Matt Wiebe Date: Thu, 29 Oct 2020 15:04:37 -0500 Subject: [PATCH] Site Editor: restore block inserter previews MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The fix in #26432 accidentally broke block previews in the Inserter due to a naïve use of `overflow: hidden` to fix the overscroll with the block library open in the site editor A little testing revealed that the `.components-visually-hidden` element inside `.block-editor-inserter__tips` might be at the root of causing a browser bug due to its odd combination of styles. Trusty `position: relative` stabilized the rendering context and there was once again peace in the land. --- packages/block-editor/src/components/inserter/style.scss | 1 + packages/interface/src/components/interface-skeleton/style.scss | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/block-editor/src/components/inserter/style.scss b/packages/block-editor/src/components/inserter/style.scss index 96df823e35faf5..d2c5d27084c2f3 100644 --- a/packages/block-editor/src/components/inserter/style.scss +++ b/packages/block-editor/src/components/inserter/style.scss @@ -276,6 +276,7 @@ $block-inserter-tabs-height: 44px; border-top: $border-width solid $gray-300; padding: $grid-unit-20; flex-shrink: 0; + position: relative; // prevents overscroll when block library is open } .block-editor-inserter__manage-reusable-blocks-container { diff --git a/packages/interface/src/components/interface-skeleton/style.scss b/packages/interface/src/components/interface-skeleton/style.scss index 552a7e7d0bf0b2..bc48a097cafe17 100644 --- a/packages/interface/src/components/interface-skeleton/style.scss +++ b/packages/interface/src/components/interface-skeleton/style.scss @@ -115,7 +115,6 @@ html.interface-interface-skeleton__html-container { .interface-interface-skeleton__left-sidebar { @include break-medium() { border-right: $border-width solid $gray-200; - overflow: hidden; // prevent overscroll } }