From 88983d3d1e6d8085fe75612a6ba982e582c3e6ec Mon Sep 17 00:00:00 2001 From: Dave Smith Date: Tue, 24 Sep 2024 16:06:52 +0100 Subject: [PATCH] Scale font size based on zoom scale --- packages/block-editor/src/components/block-list/content.scss | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/packages/block-editor/src/components/block-list/content.scss b/packages/block-editor/src/components/block-list/content.scss index c05a77e137cbf2..2b65bf8de671b8 100644 --- a/packages/block-editor/src/components/block-list/content.scss +++ b/packages/block-editor/src/components/block-list/content.scss @@ -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; }