Skip to content

Commit 9d4bd47

Browse files
committed
Use text-size-adjust: none for code blocks (stronger fix)
text-size-adjust: 100% was not sufficient -- mobile Safari still inflates text inside pre elements when content overflows horizontally (e.g., long JSON lines). Using 'none !important' completely disables the text inflation algorithm for code blocks. This explains why the first code block (bash, fits viewport) rendered correctly while the second (JSON, overflows) had inflated font size. https://claude.ai/code/session_01UjvipgoS6qs1ikzifd77Xi
1 parent b4667a2 commit 9d4bd47

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

src/css/custom.css

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,9 @@
2828
pre, pre code, .prism-code {
2929
font-size: 14px !important;
3030
line-height: 1.5 !important;
31-
-webkit-text-size-adjust: 100%;
32-
text-size-adjust: 100%;
31+
-webkit-text-size-adjust: none !important;
32+
-moz-text-size-adjust: none !important;
33+
text-size-adjust: none !important;
3334
}
3435

3536
/* Smaller code blocks on mobile for better readability */

0 commit comments

Comments
 (0)