From 03ed9971fecd1c8b2c279a1fa684f32198d47ad5 Mon Sep 17 00:00:00 2001 From: Jerry Jones Date: Thu, 10 Oct 2024 09:57:55 -0500 Subject: [PATCH] Use padding top/bottom instead of before/after for top/bottom frame --- .../block-editor/src/components/iframe/content.scss | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/packages/block-editor/src/components/iframe/content.scss b/packages/block-editor/src/components/iframe/content.scss index 3daa659cf5ebfa..a12999298b988e 100644 --- a/packages/block-editor/src/components/iframe/content.scss +++ b/packages/block-editor/src/components/iframe/content.scss @@ -32,11 +32,11 @@ $total-frame-height: calc(2 * #{$frame-size} / #{$scale}); $total-height: calc(#{$extra-content-height} + #{$total-frame-height} + 2px); margin-bottom: calc(-1 * #{$total-height}); - - &::before, - &::after { - height: calc(#{$frame-size} / #{$scale}); - } + // Add the top/bottom frame size. We use scaling to account for the left/right, as + // the padding left/right causes the contents to reflow, which breaks the 1:1 scaling + // of the content. + padding-top: calc(#{$frame-size} / #{$scale}); + padding-bottom: calc(#{$frame-size} / #{$scale}); body { min-height: calc((#{$inner-height} - #{$total-frame-height}) / #{$scale});