Skip to content

Commit

Permalink
Fix layout shift on zoom out in post/page editor.
Browse files Browse the repository at this point in the history
  • Loading branch information
jasmussen committed Oct 7, 2024
1 parent 3ab6dde commit 16a72d6
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions packages/block-editor/src/components/iframe/content.scss
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,13 @@
margin-left: calc(-1 * (#{$prev-container-width} - #{$container-width}) / 2);
}

// Avoid collapsing margins causing a layout shift when invoking zooming.
.block-editor-iframe__body,
.editor-visual-editor__post-title-wrapper {
border-top: 0.1em solid transparent;
border-bottom: 0.1em solid transparent;
}

.block-editor-iframe__html {
border: 0 solid $gray-300;
transform-origin: top center;
Expand Down

0 comments on commit 16a72d6

Please sign in to comment.