From 187428c6b7872503e175db91ac69e8423b86b3d8 Mon Sep 17 00:00:00 2001 From: Rich Tabor Date: Thu, 1 Aug 2024 14:32:20 -0400 Subject: [PATCH 1/8] add transition to transitioning properties --- packages/block-editor/src/components/iframe/content.scss | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/packages/block-editor/src/components/iframe/content.scss b/packages/block-editor/src/components/iframe/content.scss index 8c03d4224745af..a539b5d4f640cf 100644 --- a/packages/block-editor/src/components/iframe/content.scss +++ b/packages/block-editor/src/components/iframe/content.scss @@ -21,9 +21,13 @@ margin-left: calc(-1 * (#{$prev-container-width} - #{$container-width}) / 2); } +$beizer: cubic-bezier(0.65, 0, 0.45, 1); +$duration: 0.5s; + .block-editor-iframe__html { + border: 0 solid $gray-300; transform-origin: top center; - transition: transform 0.3s; + transition: transform $duration $beizer, background $duration $beizer, border $duration $beizer, margin $duration $beizer; @include reduce-motion("transition"); } @@ -54,6 +58,7 @@ display: flex; flex-direction: column; + > .is-root-container:not(.wp-block-post-content) { flex: 1; display: flex; From 91738e831f9a8fe5213810cf2a106198b10e4da2 Mon Sep 17 00:00:00 2001 From: Rich Tabor Date: Thu, 1 Aug 2024 14:36:35 -0400 Subject: [PATCH 2/8] remove border and radius from tablet/mobile --- packages/block-editor/src/components/use-resize-canvas/index.js | 2 -- 1 file changed, 2 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 a843f160056367..27c898735e1df1 100644 --- a/packages/block-editor/src/components/use-resize-canvas/index.js +++ b/packages/block-editor/src/components/use-resize-canvas/index.js @@ -62,8 +62,6 @@ export default function useResizeCanvas( deviceType ) { marginLeft: marginHorizontal, marginRight: marginHorizontal, height, - borderRadius: '2px 2px 2px 2px', - border: '1px solid #ddd', overflowY: 'auto', }; default: From b337f95a44cc4a672cb3f905f35e098b0f50b68f Mon Sep 17 00:00:00 2001 From: Rich Tabor Date: Thu, 1 Aug 2024 14:37:52 -0400 Subject: [PATCH 3/8] zoom out a little more --- packages/block-editor/src/components/iframe/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/block-editor/src/components/iframe/index.js b/packages/block-editor/src/components/iframe/index.js index 669e2fe25a9fbb..eca805f2f2aab0 100644 --- a/packages/block-editor/src/components/iframe/index.js +++ b/packages/block-editor/src/components/iframe/index.js @@ -305,7 +305,7 @@ function Iframe( { iframeDocument.documentElement.classList.add( 'is-zoomed-out' ); - const maxWidth = 800; + const maxWidth = 750; iframeDocument.documentElement.style.setProperty( '--wp-block-editor-iframe-zoom-out-scale', scale === 'default' From 1b5ff108a3b38a3e7df1aed9cafdc2faadc5cfa0 Mon Sep 17 00:00:00 2001 From: Rich Tabor Date: Thu, 1 Aug 2024 14:44:40 -0400 Subject: [PATCH 4/8] scope properties --- packages/block-editor/src/components/iframe/content.scss | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/packages/block-editor/src/components/iframe/content.scss b/packages/block-editor/src/components/iframe/content.scss index a539b5d4f640cf..3593edf2a4be57 100644 --- a/packages/block-editor/src/components/iframe/content.scss +++ b/packages/block-editor/src/components/iframe/content.scss @@ -21,10 +21,9 @@ margin-left: calc(-1 * (#{$prev-container-width} - #{$container-width}) / 2); } -$beizer: cubic-bezier(0.65, 0, 0.45, 1); -$duration: 0.5s; - .block-editor-iframe__html { + $beizer: cubic-bezier(0.65, 0, 0.45, 1); + $duration: 0.5s; border: 0 solid $gray-300; transform-origin: top center; transition: transform $duration $beizer, background $duration $beizer, border $duration $beizer, margin $duration $beizer; From 0bd50c95588f784d6b1bf99e4b262ff5f43ba55f Mon Sep 17 00:00:00 2001 From: Rich Tabor Date: Thu, 1 Aug 2024 15:09:02 -0400 Subject: [PATCH 5/8] update mobile/tablet transition --- packages/block-editor/src/components/iframe/index.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/packages/block-editor/src/components/iframe/index.js b/packages/block-editor/src/components/iframe/index.js index eca805f2f2aab0..b0d1c872a9d586 100644 --- a/packages/block-editor/src/components/iframe/index.js +++ b/packages/block-editor/src/components/iframe/index.js @@ -378,10 +378,9 @@ function Iframe( {