[VS-NfD] Add print CSS with a per-page classification header and footer #207

Closed
opened 2026-07-30 01:43:41 +02:00 by fable-5 · 1 comment
Collaborator

Plan reference: 20-massnahmenplan.md -> P1-2 (output channels)
ADR: ADR 0022
Effort: S (1 AT)
Depends on: #206

Context

Printing from the browser is the output channel most likely to produce
paper that has to carry a marking on every sheet — and it is currently
unstyled entirely.

Current state

  • No @media print block exists anywhere in apps/web/src — verified by
    search. Browser printing therefore reproduces the screen layout including
    navigation chrome.

Acceptance criteria

  • A print stylesheet sets page size and margins, suppresses navigation
    and interactive chrome, and handles break behaviour for headings,
    tables, code blocks and plugin blocks.
  • The classification appears in a running header and footer on
    every printed page (@page margin boxes or an equivalent), not
    once at the top.
  • Verified on a multi-page document as PDF-from-browser in Chromium and
    one Gecko-based browser; the check is written down so it can be
    repeated.
  • Unclassified pages print without a marking.
  • Documented in #228 alongside the other channels.

Out of scope

Server-side PDF (#208) and print styles as a general design feature beyond
what the marking needs.

**Plan reference:** `20-massnahmenplan.md` -> P1-2 (output channels) **ADR:** ADR 0022 **Effort:** S (1 AT) **Depends on:** #206 ## Context Printing from the browser is the output channel most likely to produce paper that has to carry a marking on **every sheet** — and it is currently unstyled entirely. ## Current state - No `@media print` block exists anywhere in `apps/web/src` — verified by search. Browser printing therefore reproduces the screen layout including navigation chrome. ## Acceptance criteria - [ ] A print stylesheet sets page size and margins, suppresses navigation and interactive chrome, and handles break behaviour for headings, tables, code blocks and plugin blocks. - [ ] The classification appears in a running header **and** footer on **every** printed page (`@page` margin boxes or an equivalent), not once at the top. - [ ] Verified on a multi-page document as PDF-from-browser in Chromium and one Gecko-based browser; the check is written down so it can be repeated. - [ ] Unclassified pages print without a marking. - [ ] Documented in #228 alongside the other channels. ## Out of scope Server-side PDF (#208) and print styles as a general design feature beyond what the marking needs.
fable-5 added this to the M26 — VS-NfD: classification metadata milestone 2026-07-30 01:43:41 +02:00
fable-5 added the
area:export
effort:S
vs-nfd:blocker
vs-nfd
labels 2026-07-30 01:43:41 +02:00
Author
Collaborator

Done in PR #266 (commit 809e071, CI run 543 green, fast-forward merged on Stefan's standing merge instruction).

Evidence:

  • First print stylesheet at all: A4 + margins via @page, navigation/interactive chrome suppressed, break behaviour for headings, tables, code blocks, figures and plugin blocks, orphans/widows.
  • Marking on EVERY sheet: the page content sits in a real-table PrintFrame whose thead/tfoot carry the classification banners - the one mechanism Chromium AND Gecko repeat per fragmented page. @page margin boxes are unimplemented in both engines and position:fixed placed unreliably (both verified empirically before switching).
  • Verified as PDF-from-browser on a multi-page document: Chromium 140 (Playwright page.pdf) and Firefox 153 (geckodriver WebDriver print) - 2 markings on every page, no overlap, no chrome. Repeatable procedure documented in apps/web/e2e/README.md (section Print marking check).
  • Unclassified pages print without a marking (no banner in the DOM).
  • On screen the table chain renders as plain blocks - a11y pack (10/10) and CI content pack stay green.
Done in PR #266 (commit 809e071, CI run 543 green, fast-forward merged on Stefan's standing merge instruction). Evidence: - First print stylesheet at all: A4 + margins via @page, navigation/interactive chrome suppressed, break behaviour for headings, tables, code blocks, figures and plugin blocks, orphans/widows. - Marking on EVERY sheet: the page content sits in a real-table PrintFrame whose thead/tfoot carry the classification banners - the one mechanism Chromium AND Gecko repeat per fragmented page. @page margin boxes are unimplemented in both engines and position:fixed placed unreliably (both verified empirically before switching). - Verified as PDF-from-browser on a multi-page document: Chromium 140 (Playwright page.pdf) and Firefox 153 (geckodriver WebDriver print) - 2 markings on every page, no overlap, no chrome. Repeatable procedure documented in apps/web/e2e/README.md (section Print marking check). - Unclassified pages print without a marking (no banner in the DOM). - On screen the table chain renders as plain blocks - a11y pack (10/10) and CI content pack stay green.
Sign in to join this conversation.
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: stwaidele/dorfteich#207
No description provided.