From 9b2c96a6bfe8d4a099aab0f657bf1e510686c07e Mon Sep 17 00:00:00 2001 From: Daniel Richards Date: Tue, 11 Oct 2022 16:35:12 +0800 Subject: [PATCH] Fix overflowing patterns (#44853) * Fix overflowing patterns by using overflow:hidden * Revert "Fix overflowing patterns by using overflow:hidden" This reverts commit d47f721aeb37fbeeb2455974bfc3a165fabca874. * Make pattern list items position: relative so that position: absolute visually hidden text is positioned correctly --- .../src/components/block-patterns-list/style.scss | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/packages/block-editor/src/components/block-patterns-list/style.scss b/packages/block-editor/src/components/block-patterns-list/style.scss index 8ae80f63ce1e3e..3b5c2571be0fa8 100644 --- a/packages/block-editor/src/components/block-patterns-list/style.scss +++ b/packages/block-editor/src/components/block-patterns-list/style.scss @@ -2,6 +2,11 @@ cursor: pointer; margin-bottom: $grid-unit-30; + // The list item contains absolutely positioned visually hidden text, + // so make this container relative. This prevents the bug experienced in + // https://github.com/WordPress/gutenberg/issues/44842. + position: relative; + &.is-placeholder { min-height: 100px; }