Skip to content

Legible diagram text on phones: 600px floor + scroll shadows - #953

Merged
blove merged 1 commit into
mainfrom
blove/diagram-mobile-legibility
Sep 2, 2026
Merged

Legible diagram text on phones: 600px floor + scroll shadows#953
blove merged 1 commit into
mainfrom
blove/diagram-mobile-legibility

Conversation

@blove

@blove blove commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

Summary

  • The diagram kit's 480px min-width scaled SVGs to 0.75× on phones, rendering the 10.5px meta text at ~7.9px with no visible hint that the figure scrolls (flagged in the Docs visual design: header-band callouts, SVG diagram kit, diagram audit #950 reviews).
  • Floor the SVG at 600px — type stays ≥94% of designed size on phones, and unlike a full 640px floor it still fits the ~632px desktop article column with no stray scrollbar.
  • Add scroll shadows on .tp-diagram-figure (the background-attachment: local/scroll technique, visible through the SVG's transparent dot-grid ground): a shadow appears only on the clipped side, so fully visible diagrams stay clean and clipped ones advertise the internal scroll.
  • Cover layers match the surface behind via --diagram-scroll-bg; the tinted marketing sections re-point it so no white bars appear at the figure edges.
  • Style contract updated to pin the new floor alongside the existing cap.

Test Plan

  • nx test website green (style-contracts pins min/max width)
  • nx lint website 0 errors
  • Playwright docs suite green (8/8)
  • Browser-verified: 375px → SVG renders at 600px (94% scale), figure scrolls internally, page does not, right-edge shadow visible; 1280px → 632px column, no scroll, no shadows; homepage marketing figure resolves the tinted cover (#fbfbfb)

🤖 Generated with Claude Code

…hadows

The kit's 480px min-width scaled diagram SVGs to 0.75 on phones, rendering
10.5px meta text at ~7.9px with no hint the figure scrolls. Floor the SVG
at 600px (>=94% of designed type size; still fits the ~632px desktop column
scroll-free) and add local/scroll background scroll shadows on the figure,
visible through the transparent dot-grid ground, with a surface-matched
cover var the tinted marketing sections re-point.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@blove
blove enabled auto-merge (squash) September 2, 2026 04:37
@vercel

vercel Bot commented Sep 2, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
threadplane Ready Ready Preview Sep 2, 2026 4:39am UTC

Request Review

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Automated approval: this PR received an intelligent (AI) code review. See the review comments on this PR.

@github-actions

github-actions Bot commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

Claude finished @blove's task in 0s —— View job


I'll analyze this and get back to you.

@blove
blove merged commit 216cb2e into main Sep 2, 2026
30 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant