Skip to content

Commit

Permalink
Update viewport width in PreviewBlockPopover for better block preview…
Browse files Browse the repository at this point in the history
… alignment
  • Loading branch information
michalczaplinski committed Jan 2, 2025
1 parent 9b5a345 commit af0eadc
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,9 @@ export default function PreviewBlockPopover( { blocks } ) {
<div className="block-editor-block-switcher__preview-title">
{ __( 'Preview' ) }
</div>
<BlockPreview viewportWidth={ 500 } blocks={ blocks } />
{ /* 600px is the value of $break-small in base-styles/_breakpoints.scss.
So we set the viewport somewhat arbitrarily to 610px to account for the padding of the block. */ }
<BlockPreview viewportWidth={ 610 } blocks={ blocks } />
</div>
</Popover>
</div>
Expand Down

0 comments on commit af0eadc

Please sign in to comment.