Skip to content

Contain wide tables within the document viewport - #29

Merged
masnwilliams merged 1 commit into
mainfrom
hypeship/contain-table-overflow
Aug 29, 2026
Merged

Contain wide tables within the document viewport#29
masnwilliams merged 1 commit into
mainfrom
hypeship/contain-table-overflow

Conversation

@masnwilliams

@masnwilliams masnwilliams commented Aug 29, 2026

Copy link
Copy Markdown
Contributor

summary

  • make wide document tables independently horizontally scrollable
  • prevent table content from widening the full document viewport
  • cover the injected viewer style with a regression test

testing

  • npm test
  • npm run build
  • Chromium smoke test confirmed the page scroll width stays at the viewport while the table has its own larger scroll width

Note

Low Risk
CSS-only change in the doc overlay with a string assertion test; no auth, data, or API impact.

Overview
Wide markdown tables no longer stretch the document viewer’s page width. The sandbox overlay injects a table{display:block;max-width:100%;overflow-x:auto} rule ahead of the existing highlight styles in ensureStyle(), so each table scrolls horizontally inside the viewport instead of widening the whole doc.

A Vitest regression in overlay.test.ts asserts that OVERLAY_SCRIPT still includes that rule.

Reviewed by Cursor Bugbot for commit c032d65. Bugbot is set up for automated code reviews on this repo. Configure here.

@vercel

vercel Bot commented Aug 29, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
justhtml Ready Ready Preview Aug 29, 2026 3:49pm

@masnwilliams
masnwilliams merged commit c52f5de into main Aug 29, 2026
5 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