Skip to content

Commit

Permalink
Editor: Hide block editor warnings for pattern previews
Browse files Browse the repository at this point in the history
  • Loading branch information
yogeshbhutkar committed Jan 16, 2025
1 parent 74986ed commit cc27cf0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/block-editor/src/components/block-preview/auto.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,13 +39,13 @@ function ScaledBlockPreview( {
};
}, [] );

// Avoid scrollbars for pattern previews.
// Avoid scrollbars and hide block editor warnings for pattern previews.
const editorStyles = useMemo( () => {
if ( styles ) {
return [
...styles,
{
css: 'body{height:auto;overflow:hidden;border:none;padding:0;}',
css: 'body{height:auto;overflow:hidden;border:none;padding:0;} .block-editor-warning{display:none;} .is-root-container .block-editor-block-list__block.has-warning:after{background:none;}',
__unstableType: 'presets',
},
...additionalStyles,
Expand Down

0 comments on commit cc27cf0

Please sign in to comment.