Skip to content

Commit

Permalink
Try: Hide the columns inserter in pattern previews. (#36626)
Browse files Browse the repository at this point in the history
* Try: Hide the columns inserter in pattern previews.

* Try a classname instead.

* Address feedback.
  • Loading branch information
jasmussen authored and noisysocks committed Nov 23, 2021
1 parent ca22e88 commit 3d6c09c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
3 changes: 3 additions & 0 deletions packages/block-editor/src/components/block-preview/auto.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,9 @@ function AutoBlockPreview( { viewportWidth, __experimentalPadding } ) {
const {
ownerDocument: { documentElement },
} = bodyElement;
documentElement.classList.add(
'block-editor-block-preview__content-iframe'
);
documentElement.style.position = 'absolute';
documentElement.style.width = '100%';
bodyElement.style.padding =
Expand Down
5 changes: 5 additions & 0 deletions packages/block-editor/src/components/block-preview/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -36,3 +36,8 @@
}
}
}

// Hide inserter from previews.
.block-editor-block-preview__content-iframe .block-list-appender {
display: none;
}

0 comments on commit 3d6c09c

Please sign in to comment.