Living Documentation

Rubric: code width

Written by a person. Last read by a person on 2026-09-05, 3 days ago. Its facts were checked by the eval suite on 2026-09-07.

Enforced by check_code_width.

The claim

No rendered line of code is wider than the column the stylesheet built to hold it.

Observable evidence

The pass bar

Every line is 80 characters or fewer. Mermaid blocks are exempt: they are diagram sources rather than code a reader types, and they are wide by nature.

Why this rubric exists

A code block that scrolls sideways hides the end of the line, and a reader copies the part they can see. The failure is silent in both directions: the page looks fine, and the reader does not know there was more.

The number is not a convention borrowed from somewhere else. Design C sizes its code column by measuring 80 characters at the rendered font in a browser, which came to 675 pixels, then choosing widths and a breakpoint that clear it with eleven pixels to spare. The limit here and the widths in the stylesheet are two halves of one decision, and this check is how you find out when someone has changed only one of them.

Ambiguous cases

Rendered, never source. A line holding retry-after is 36 characters of template that becomes 11 characters of header name. Checking markdown reports lines that are fine and misses lines that are not.

A long string that cannot be broken is a real conflict between this rubric and accuracy. Break the statement rather than the string: assign it to a name on its own line first. Three lines in this repository were fixed that way rather than by truncating anything.

Narrow viewports still scroll, and that is correct. Below about 760 pixels no column can hold 80 characters, and horizontal scroll inside the block is the honest fallback. This rubric is about the column the stylesheet builds, not about every device.