From 5f1a6356033625fdca7c3c7ab5c1a1411ccbe53b 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; }