Skip to content

Commit

Permalink
Account for scaling in the frame height
Browse files Browse the repository at this point in the history
  • Loading branch information
jeryj committed Oct 9, 2024
1 parent cecc02c commit 6a247d6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/block-editor/src/components/iframe/content.scss
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
// Chrome seems to respect that transform scale shouldn't affect the layout size of the element,
// so we need to adjust the height of the content to match the scale by using negative margins.
$extra-content-height: calc(#{$content-height} * (1 - #{$scale}));
$total-frame-height: calc(2 * #{$frame-size});
$total-frame-height: calc(2 * #{$frame-size} / #{$scale});
$total-height: calc(#{$extra-content-height} + #{$total-frame-height} + 2px);
margin-bottom: calc(-1 * #{$total-height});

Expand Down

0 comments on commit 6a247d6

Please sign in to comment.