Skip to content

Commit

Permalink
Scale font size based on zoom scale
Browse files Browse the repository at this point in the history
  • Loading branch information
getdave authored and draganescu committed Sep 25, 2024
1 parent bf995e5 commit 88983d3
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions packages/block-editor/src/components/block-list/content.scss
Original file line number Diff line number Diff line change
Expand Up @@ -417,6 +417,11 @@ _::-webkit-full-page-media, _:future, :root .has-multi-selection .block-editor-b
font-size: $default-font-size;
font-family: $default-font;

.is-zoomed-out & {
// Scale the font size based on the zoom level.
font-size: calc(#{$default-font-size} * ( 2 - var(--wp-block-editor-iframe-zoom-out-scale) ));
}

&.is-dragged-over {
background: $gray-400;
}
Expand Down

0 comments on commit 88983d3

Please sign in to comment.