From aa04aceb97ce2b4e568c383e494896f6ea331ff1 Mon Sep 17 00:00:00 2001 From: Rich Tabor Date: Thu, 10 Oct 2024 14:51:43 +0200 Subject: [PATCH] Zoom-out and Device preview: use 40px padding consistently (#66018) Co-authored-by: richtabor Co-authored-by: youknowriad --- .../block-editor/src/components/use-resize-canvas/index.js | 4 +--- packages/editor/src/components/visual-editor/index.js | 2 +- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/packages/block-editor/src/components/use-resize-canvas/index.js b/packages/block-editor/src/components/use-resize-canvas/index.js index 7243b0f1b0b82..3b4d97a097964 100644 --- a/packages/block-editor/src/components/use-resize-canvas/index.js +++ b/packages/block-editor/src/components/use-resize-canvas/index.js @@ -43,11 +43,9 @@ export default function useResizeCanvas( deviceType ) { return deviceWidth < actualWidth ? deviceWidth : actualWidth; }; - const marginValue = () => ( window.innerHeight < 800 ? 36 : 64 ); - const contentInlineStyles = ( device ) => { const height = device === 'Mobile' ? '768px' : '1024px'; - const marginVertical = marginValue() + 'px'; + const marginVertical = '40px'; const marginHorizontal = 'auto'; switch ( device ) { diff --git a/packages/editor/src/components/visual-editor/index.js b/packages/editor/src/components/visual-editor/index.js index 88d2dac8ffd77..4b41ca0146b5b 100644 --- a/packages/editor/src/components/visual-editor/index.js +++ b/packages/editor/src/components/visual-editor/index.js @@ -341,7 +341,7 @@ function VisualEditor( { isZoomedOut && ! isTabletViewport ? { scale: 'default', - frameSize: '48px', + frameSize: '40px', } : {};