Skip to content

Commit

Permalink
Fix scrollbars on pattern transforms (#55069)
Browse files Browse the repository at this point in the history
* Fix scrollbars on pattern transforms

* Fix single pattern previews

* Improve classname semantics

* Remove modal title
  • Loading branch information
talldan authored and mikachan committed Oct 10, 2023
1 parent d505480 commit 9468195
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -60,10 +60,7 @@ function PreviewPatternsPopover( { patterns, onSelect } ) {
className="block-editor-block-switcher__preview__popover"
position="bottom right"
>
<div className="block-editor-block-switcher__preview">
<div className="block-editor-block-switcher__preview-title">
{ __( 'Preview' ) }
</div>
<div className="block-editor-block-switcher__preview is-pattern-list-preview">
<BlockPatternsList
patterns={ patterns }
onSelect={ onSelect }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@

.block-editor-block-switcher__preview__popover {
display: none;
overflow: hidden;

// Position correctly. Needs specificity.
&.components-popover {
Expand All @@ -115,6 +116,7 @@
border-radius: $radius-block-ui;
outline: none;
box-shadow: none;
overflow: auto;
}

.block-editor-block-switcher__preview {
Expand All @@ -124,6 +126,10 @@
// Use padding to prevent the pattern previews focus style from being cut-off.
padding: 0 $grid-unit-20;
overflow: hidden;

&.is-pattern-list-preview {
overflow: unset;
}
}
}

Expand Down

0 comments on commit 9468195

Please sign in to comment.