From 2fea6e996eea5f43c3ae0167812372097711c850 Mon Sep 17 00:00:00 2001 From: Daniel Richards Date: Mon, 12 Sep 2022 18:17:16 +0800 Subject: [PATCH] Add overflow:hidden and adjust margins --- .../block-editor/src/components/block-switcher/style.scss | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/packages/block-editor/src/components/block-switcher/style.scss b/packages/block-editor/src/components/block-switcher/style.scss index 23e32a1ffa642..2a8acbf413014 100644 --- a/packages/block-editor/src/components/block-switcher/style.scss +++ b/packages/block-editor/src/components/block-switcher/style.scss @@ -119,8 +119,10 @@ .block-editor-block-switcher__preview { width: 300px; height: auto; - max-height: 500px; - padding: $grid-unit-20; + // Subtract margin from max-height. + max-height: calc(500px - #{$grid-unit-40}); + margin: $grid-unit-20; + overflow: hidden; } }