diff --git a/packages/starlight/src/style/print.css b/packages/starlight/src/style/print.css --- a/packages/starlight/src/style/print.css +++ b/packages/starlight/src/style/print.css @@ -92,6 +92,15 @@ .sl-markdown-content :is(h1, h2, h3, h4, h5, h6) { break-after: avoid; } + /* Prevent wide tables from overflowing the printable page and hiding their last columns. */ + .sl-markdown-content table:not(:where(.not-content *)) { + display: table; + table-layout: fixed; + width: 100%; + } + .sl-markdown-content :is(th, td):not(:where(.not-content *)) { + overflow-wrap: break-word; + } .sl-markdown-content :is(p, li) { orphans: 2; widows: 2;