Skip to content

fix(web): add print margins and scale wide tables to fit the page#238

Merged
felixevers merged 1 commit into
mainfrom
claude/print-table-margins
Jun 3, 2026
Merged

fix(web): add print margins and scale wide tables to fit the page#238
felixevers merged 1 commit into
mainfrom
claude/print-table-margins

Conversation

@felixevers
Copy link
Copy Markdown
Member

What

Improves the native browser print view (Ctrl+P) for the task/patient tables.

Previously the print stylesheet used a zero-margin @page together with an
auto-layout table, so:

  • the table printed edge-to-edge with no margins, and
  • wide tables overflowed the sheet and were clipped on the right.

Changes (web/style/table-printing.css, print media only)

  • Add a 1cm page margin on every edge for breathing room.
  • Switch the printed table to table-layout: fixed with even, page-width
    columns, and neutralize the on-screen auto-size per-column widths
    (.print-content colgroup col { width: auto }). This makes a wide table
    scale down to the printable area instead of overflowing.
  • Let long cell values wrap (word-break: break-word /
    overflow-wrap: anywhere) so content reflows within its (now narrower)
    column rather than being cut at the page margin.

Net effect: margins are added and the whole table scales to fit the page
without cutting content.

Notes

Print-media CSS only — no runtime/TS behavior changes. Builds on the
already-merged #237 (inline-editable property cells now print).

https://claude.ai/code/session_01Pz8wqwQhDmEKGpHayg8CPs


Generated by Claude Code

The native print view used a zero-margin @page with an auto-layout table, so
the table ran edge to edge and wide tables overflowed the sheet and were
clipped on the right.

Add a 1cm page margin and switch the printed table to a fixed layout with
even, page-width columns (neutralizing the on-screen auto-size widths). Long
cell values now wrap instead of spilling past the column, so the whole table
scales down to fit the printable area without cutting content.
@felixevers felixevers merged commit f05b924 into main Jun 3, 2026
16 checks passed
@felixevers felixevers deleted the claude/print-table-margins branch June 3, 2026 21:15
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.

2 participants