Skip to content

Enable pinch-to-zoom on mobile#37

Merged
singhsanjay12 merged 1 commit intomainfrom
ssingh1/enable-mobile-zoom
Mar 3, 2026
Merged

Enable pinch-to-zoom on mobile#37
singhsanjay12 merged 1 commit intomainfrom
ssingh1/enable-mobile-zoom

Conversation

@singhsanjay12
Copy link
Copy Markdown
Owner

Summary

  • Remove user-scalable=no from the viewport meta tag in _includes/head.html

Why

The SVG diagrams are 800px wide. On a 375px phone screen they render at ~47% scale, making the text inside them small. With user-scalable=no set, iOS and Android both block pinch-to-zoom entirely, leaving no way to enlarge them.

Removing user-scalable=no restores the browser's native pinch-to-zoom. The rest of the viewport tag (initial-scale=1, shrink-to-fit=no, viewport-fit=cover) is unchanged.

Testing Done

  • Verify pinch-to-zoom works on a post with SVG diagrams on iOS Safari
  • Verify pinch-to-zoom works on Android Chrome
  • Verify page layout is otherwise unaffected

The viewport meta tag had user-scalable=no which blocked pinch-to-zoom
on iOS and Android. SVG diagrams are 800px wide and scale down to ~47%
on a 375px screen, making text inside unreadable without zoom.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@singhsanjay12 singhsanjay12 merged commit 46509fa into main Mar 3, 2026
1 check passed
@singhsanjay12 singhsanjay12 deleted the ssingh1/enable-mobile-zoom branch March 3, 2026 00:17
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