Skip to content

PRDCT-379: fix wide tables clipping under the TOC instead of scrolling#989

Open
Iamfle4ka wants to merge 1 commit into
mainfrom
feat/PRDCT-379-wide-table-overflow
Open

PRDCT-379: fix wide tables clipping under the TOC instead of scrolling#989
Iamfle4ka wants to merge 1 commit into
mainfrom
feat/PRDCT-379-wide-table-overflow

Conversation

@Iamfle4ka

Copy link
Copy Markdown
Collaborator

Fixes a site-wide CSS render bug where wide tables get clipped on the right (under the "On this page" panel) instead of scrolling. Independent of the Diátaxis revamp; CSS-only change to src/styles/custom.css.

Root cause (two issues)

  1. Wrapped markdown tables couldn't scroll. A remark pass already wraps markdown tables in .beacon-table-scroll { overflow-x:auto }, but the base rule table { width:100% } pinned the table to the wrapper width — so wide content compressed/clipped instead of overflowing and triggering the scroll.
  2. Raw HTML <table> blocks aren't wrapped at all — the remark pass only matches mdast table nodes, and hand-written tables can split across several HTML nodes, so they stay unwrapped (e.g. the Transformations index "Other features" table).

Fix (custom.css)

  1. .beacon-table-scroll > tablewidth: max-content; min-width: 100% (narrow tables still fill the column; wide ones grow so the wrapper scrolls).
  2. CSS fallback: any unwrapped, non-spec, non-status table → display: block; overflow-x: auto.

Verification (production build, viewports 1280px + 600px)

Page Table Result
r-plain/array-splitter narrow markdown fills width, no scroll, no overflow — no regression
transformations/ "Other features" raw HTML fallback applied; fits/scrolls, no overflow
components/extractors/database/mysql 7 wide markdown (content up to 2948px) all scroll inside the wrapper; none overflow the viewport

No table overflows the viewport at any tested width; build clean (254 pages). AC met: wide tables scroll/wrap at all viewport widths, no horizontal clipping.

🤖 Generated with Claude Code

Site-wide CSS render bug, independent of the Diátaxis revamp. Two causes:

1. Wrapped markdown tables couldn't scroll — the base rule `table { width:100% }`
   pinned them, so wide content compressed/clipped instead of overflowing the
   `.beacon-table-scroll` wrapper. Fix: wrapper > table uses `width: max-content;
   min-width: 100%` (narrow tables still fill; wide ones grow → wrapper scrolls).

2. Raw HTML <table> blocks aren't wrapped at all (the remark pass only catches
   mdast table nodes, and hand-written tables split across HTML nodes). Fix: a
   CSS fallback makes any unwrapped, non-spec, non-status table
   `display: block; overflow-x: auto`.

Verified in a production build at 1280px and 600px on array-splitter (narrow
markdown — still full-width, no regression), the Transformations index
"Other features" HTML table (fallback), and the MySQL connector page (7 wide
markdown tables, content up to 2948px) — all scroll, none overflow the viewport.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@linear

linear Bot commented Jun 24, 2026

Copy link
Copy Markdown

PRDCT-379

@vercel

vercel Bot commented Jun 24, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
connection-docs Ready Ready Preview, Comment Jun 24, 2026 10:06pm

Request Review

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