Problem
base.css has a deliberate rule letting tables, code blocks and figures extend
past the reading column on wide screens, with a comment explaining why:
/* Tables, code blocks and figures are read by scanning rather than line by
line, and a text-width column squeezes them ... */
@media screen and (min-width: 1024px) {
.container.is-prose .content > table,
.container.is-prose .content > pre,
.container.is-prose .content > figure {
margin-inline: calc((var(--measure-content) - var(--breakout)) / 2);
width: var(--breakout);
}
}
For tables it has no effect. A later rule caps them:
.content table {
display: block;
max-width: 100%;
overflow-x: auto;
width: max-content;
}
max-width: 100% resolves against the 640px content box, so the width: var(--breakout) (52rem, 832px) above is clamped straight back to 640px. Measured
in a headless browser at a 1280px viewport: table width 640px, not 832px.
The result is that a table which was meant to widen instead scrolls sideways
inside the column, on a screen with room to spare. It affects
/build/manual/contract-abi/ and /build/manual/typescript-sdk/, and it shaped
the table on /bug/ (#167), which was written narrower than it wanted
to be to work around this.
pre and figure are probably unaffected since they have no equivalent
max-width: 100% rule, but that is worth confirming rather than assuming.
Suggested fix
Raise the cap inside the same media query, e.g. add max-width: var(--breakout)
alongside the existing width. Below 1024px nothing should change: tables must
keep scrolling in the column rather than pushing the page sideways.
This needs a visual check on the pages that have wide tables before merging,
which is why it is filed rather than folded into #167.
[AI-assisted - Claude]
Problem
base.csshas a deliberate rule letting tables, code blocks and figures extendpast the reading column on wide screens, with a comment explaining why:
For tables it has no effect. A later rule caps them:
max-width: 100%resolves against the 640px content box, so thewidth: var(--breakout)(52rem, 832px) above is clamped straight back to 640px. Measuredin a headless browser at a 1280px viewport: table width 640px, not 832px.
The result is that a table which was meant to widen instead scrolls sideways
inside the column, on a screen with room to spare. It affects
/build/manual/contract-abi/and/build/manual/typescript-sdk/, and it shapedthe table on
/bug/(#167), which was written narrower than it wantedto be to work around this.
preandfigureare probably unaffected since they have no equivalentmax-width: 100%rule, but that is worth confirming rather than assuming.Suggested fix
Raise the cap inside the same media query, e.g. add
max-width: var(--breakout)alongside the existing
width. Below 1024px nothing should change: tables mustkeep scrolling in the column rather than pushing the page sideways.
This needs a visual check on the pages that have wide tables before merging,
which is why it is filed rather than folded into #167.
[AI-assisted - Claude]