github.com/troglobit / digit

Stop iOS Safari inflating code and diff text

Mobile Safari's text auto-sizing enlarged the wide <pre> code and diff
blocks past their neighbours (line numbers, commit message).  Pin
text-size-adjust so everything renders at the CSS size.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
Joachim Wiberg · 59 days ago 🏷 1.1commit a73851e · parent ff62e89 · child 6f14311 · patch
diff --git a/static/style.css b/static/style.css
index fcc6566..cc0a91b 100644
--- a/static/style.css
+++ b/static/style.css
@@ -49,6 +49,10 @@ body {
   background: var(--bg);
   color: var(--fg);
   font: 16px/1.5 system-ui, sans-serif;
+  /* stop iOS Safari inflating wide <pre> code/diff blocks past their
+     neighbours (line numbers, commit message) */
+  -webkit-text-size-adjust: 100%;
+  text-size-adjust: 100%;
 }
 
 header {