Skip to content

Commit

Permalink
Site Editor: restore block inserter previews (#26583)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
mattwiebe authored Oct 30, 2020
1 parent 9c753f7 commit a224cbf
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 1 deletion.
1 change: 1 addition & 0 deletions packages/block-editor/src/components/inserter/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
}

Expand Down

0 comments on commit a224cbf

Please sign in to comment.