diff --git a/packages/block-editor/src/components/block-canvas/style.scss b/packages/block-editor/src/components/block-canvas/style.scss index 2dc9e32d7a393c..d3dee1ff9ee94c 100644 --- a/packages/block-editor/src/components/block-canvas/style.scss +++ b/packages/block-editor/src/components/block-canvas/style.scss @@ -2,12 +2,5 @@ iframe[name="editor-canvas"] { width: 100%; height: 100%; display: block; -} - -iframe[name="editor-canvas"]:not(.has-editor-padding) { background-color: $white; } - -iframe[name="editor-canvas"].has-editor-padding { - padding: $grid-unit-30 $grid-unit-30 0; -} diff --git a/packages/edit-post/src/components/visual-editor/index.js b/packages/edit-post/src/components/visual-editor/index.js index 74dffb35fcd273..48621d7f49adae 100644 --- a/packages/edit-post/src/components/visual-editor/index.js +++ b/packages/edit-post/src/components/visual-editor/index.js @@ -31,11 +31,14 @@ export default function VisualEditor( { styles } ) { isBlockBasedTheme, hasV3BlocksOnly, isEditingTemplate, + isEditingPattern, } = useSelect( ( select ) => { const { isFeatureActive } = select( editPostStore ); - const { getEditorSettings, getRenderingMode } = select( editorStore ); + const { getEditorSettings, getRenderingMode, getCurrentPostType } = + select( editorStore ); const { getBlockTypes } = select( blocksStore ); const editorSettings = getEditorSettings(); + const currentPostType = getCurrentPostType(); return { isWelcomeGuideVisible: isFeatureActive( 'welcomeGuide' ), @@ -44,8 +47,8 @@ export default function VisualEditor( { styles } ) { hasV3BlocksOnly: getBlockTypes().every( ( type ) => { return type.apiVersion >= 3; } ), - isEditingTemplate: - select( editorStore ).getCurrentPostType() === 'wp_template', + isEditingPattern: currentPostType === 'wp_block', + isEditingTemplate: currentPostType === 'wp_template', }; }, [] ); const hasMetaBoxes = useSelect( @@ -83,6 +86,7 @@ export default function VisualEditor( { styles } ) {