From 842f9006aa6dec1c667e046d3e4f42efd337dd22 Mon Sep 17 00:00:00 2001 From: Hugo Bois Date: Sat, 4 Jul 2026 13:59:14 +0200 Subject: [PATCH] fix editor font size on iOS --- styles/globals.css | 8 +++++--- styles/scriptio.css | 8 +++++--- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/styles/globals.css b/styles/globals.css index f5071b8..bf164b2 100644 --- a/styles/globals.css +++ b/styles/globals.css @@ -8,9 +8,11 @@ body { overflow: clip; /* Stop iOS from auto-inflating text ("text autosizing"): the screenplay * paragraphs pin line-height to a fixed 16px, so inflating only the - * font-size crams the lines on top of each other in the editor. */ - -webkit-text-size-adjust: 100%; - text-size-adjust: 100%; + * font-size crams the lines on top of each other in the editor. `none` + * (not 100%) is required — iOS WebKit still boosted the font at 100% — + * and it's safe because user scaling is disabled in the viewport meta. */ + -webkit-text-size-adjust: none; + text-size-adjust: none; } .app-layout { diff --git a/styles/scriptio.css b/styles/scriptio.css index f55f12b..d25db50 100644 --- a/styles/scriptio.css +++ b/styles/scriptio.css @@ -60,9 +60,11 @@ /* iOS text autosizing inflates the font past the fixed 16px line box, clipping page numbers and the first line of each page and making the text look oversized. The html/body reset doesn't reliably reach this - zoomed subtree, so pin autosizing off on the editor itself. */ - -webkit-text-size-adjust: 100%; - text-size-adjust: 100%; + zoomed subtree, so pin autosizing off on the editor itself. `none` is + required rather than 100% — iOS WebKit kept boosting the font inside + the zoomed subtree at 100%. Safe here since user scaling is disabled. */ + -webkit-text-size-adjust: none; + text-size-adjust: none; /* Default screenplay paragraph attributes - direct children only Critical: block + width:100% ensures consistent sizing between empty