Skip to content

Commit 5af89c7

Browse files
zizhaofclaude
andcommitted
fix(demo): pin text-size-adjust on PinDemo so large system fonts don't crop the card
Chat bubbles in PinDemo / MobilePinDemo use px-based font sizes (text-[12px] etc.) inside a fixed-height container with overflow-hidden. When a user sets their phone's system font to "Large" or enables Chrome's Text Scaling accessibility setting, Android Chrome (and iOS Safari in some configs) multiplies px text sizes, which pushes bubble heights past BODY_H=340 and the card clips the last line — visible as the demo "cutting off". The demo is a visual illustration, not readable prose, so it's treated like a video/screenshot: textSizeAdjust: 100% locks it to the designed size. All other text on the page (hero, inputs, articles) still respects accessibility font-size settings. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
1 parent c1f3933 commit 5af89c7

2 files changed

Lines changed: 19 additions & 2 deletions

File tree

frontend/components/MobilePinDemo.tsx

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -336,7 +336,16 @@ export default function MobilePinDemo() {
336336
return (
337337
<div
338338
className="w-full select-none"
339-
style={{ maxWidth: 380 }}
339+
style={{
340+
maxWidth: 380,
341+
// Pin text at the designed size — this demo card behaves like a
342+
// video/screenshot, not readable prose. Without this, Android
343+
// Chrome's Text Scaling and iOS font boost can enlarge the
344+
// px-based bubble text, which then overflows the fixed-height
345+
// body (340px) + overflow-hidden and crops the last line.
346+
textSizeAdjust: "100%",
347+
WebkitTextSizeAdjust: "100%",
348+
}}
340349
onTouchStart={nudgeTouch}
341350
onPointerDown={nudgeTouch}
342351
>

frontend/components/PinDemo.tsx

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -341,7 +341,15 @@ export default function PinDemo() {
341341
return (
342342
<div
343343
className="w-full select-none mx-auto"
344-
style={{ maxWidth: 1080 }}
344+
style={{
345+
maxWidth: 1080,
346+
// Pin text at the designed size — this demo behaves like a
347+
// video/screenshot, not readable prose. Needed so Android-tablet
348+
// Chrome Text Scaling / other accessibility font inflation can't
349+
// overflow the fixed-height body + overflow-hidden and crop rows.
350+
textSizeAdjust: "100%",
351+
WebkitTextSizeAdjust: "100%",
352+
}}
345353
onMouseMove={nudgeHover}
346354
onMouseEnter={nudgeHover}
347355
>

0 commit comments

Comments
 (0)