Skip to content

Drop nested multi-column passage layout; document Firefox print-pagination limitation - #208

Merged
brianglass merged 2 commits into
mainfrom
fix-firefox-print-pagination
Aug 20, 2026
Merged

Drop nested multi-column passage layout; document Firefox print-pagination limitation#208
brianglass merged 2 commits into
mainfrom
fix-firefox-print-pagination

Conversation

@brianglass

Copy link
Copy Markdown
Owner

Summary

Follow-up to #207 (already merged) -- these two commits were still on that branch when it was merged one commit early, so they never made it into main. Continuing the Firefox print-pagination investigation from that PR:

  • Tried to reclaim headroom: added page-break-before: avoid (legacy alias alongside break-before: avoid) and trimmed #orthocal-content > header's print padding from screen's 2.2em down to 0.5em, to give the page-break hint an actual better chance of holding.
  • Dropped the nested multi-column passage layout entirely, screen and print both: Brian's call -- since Scripture Readings/Commemorations are already split side by side, a nested multi-column text flow inside each already-narrower section didn't add anything. Removing it also served as a diagnostic: if Firefox was still pushing the grid to page 2 even with this simpler, single-level structure, that would rule out "nested fragmentation context" as the cause.
  • Investigation closed out: it didn't help. Confirmed by process of elimination that Firefox treats the .readings-columns grid as atomic for print pagination -- it either fits entirely in the remaining page space or moves entirely to the next page, and the full day's readings/stories content is essentially always taller than one page, so it always moves. Chrome and Safari don't share this limitation. Brian's decision: accept it as a known cross-engine gap rather than give up the side-by-side layout (declined both alternatives that were on the table -- CSS multicol instead of grid, or single-column stacking for print). Documented in place in print.css so this isn't re-litigated later.

Verification

  • Diagnosed against real Safari/Chrome/Firefox print output directly (not just the forced-media simulation used elsewhere in this print.css work) -- print-engine page-fragmentation behavior isn't fully observable outside real print rendering.
  • Full test suite: docker compose run --rm tests -- 162 tests, all passing.

Test plan

  • Full test suite passes
  • Confirmed against real Firefox print output that the change doesn't regress anything (the pagination behavior is unchanged/accepted, not fixed)
  • Final spot-check once merged

🤖 Generated with Claude Code

https://claude.ai/code/session_01Hf6j2xXQXywHVh3HAVRxB3

brianglass and others added 2 commits August 20, 2026 16:45
Brian reports the readings are still breaking to page 2 after title
in Firefox even with break-before: avoid on .readings-columns. That
property is a hint, not a guarantee -- any engine can still break
there if there genuinely isn't room left on the page, avoid or not.
Two changes to give it a better shot:

- Added page-break-before: avoid alongside break-before: avoid, in
  case Firefox's fragmentation-property support has any gap between
  the legacy and modern property names for this case.
- Trimmed #orthocal-content > header's print padding from screen's
  2.2em top/bottom down to 0.5em -- real vertical space back for the
  break hint to have room to work with, rather than just asking
  harder for the same amount of content to fit.

Neither of these is a guaranteed fix -- if the header content itself
(particularly a long commemorations summary list on some days) is
tall enough on its own, no page-break hint can force it to fit page 1.
Asked Brian for more detail (which date, whether it's the whole
section or just a long list spilling) to tell a genuine content-length
ceiling apart from something still fixable.

Verified the local dev server serves the updated CSS with a fresh
ETag. Full test suite (162 tests) passes.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Hf6j2xXQXywHVh3HAVRxB3
print-pagination gap as a known limitation

Brian's call: since Scripture Readings/Commemorations are already
split side by side (in both screen and print), an additional nested
multi-column text flow inside each already-narrower section doesn't
add anything -- dropped columns/column-gap/column-rule from
main.css's .passage entirely (both screen and print, no override
needed anymore since there's nothing to override).

Also confirms and closes out the Firefox pagination investigation:
removing the nested multi-column context (this commit) did NOT fix
Firefox still pushing the whole readings-columns grid to page 2,
which rules out "nested fragmentation context" as the cause and
confirms the real one -- Firefox treats CSS Grid as atomic for print
pagination (fits entirely on the current page, or moves entirely to
the next one; no partial fragmentation), and the grid's full content
is essentially always taller than one page. break-before /
page-break-before: avoid and the trimmed header padding are kept as
a harmless best-effort hint, but documented in place as not being a
real fix for this. Brian's decision: accept it as a known Chrome/
Safari-vs-Firefox gap rather than give up the side-by-side layout
(the alternatives -- CSS multicol instead of grid, or single-column
stacking -- were both on the table and explicitly declined in favor
of keeping the screen-matching layout).

Full test suite (162 tests) passes.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Hf6j2xXQXywHVh3HAVRxB3
@brianglass
brianglass merged commit 65fa9ea into main Aug 20, 2026
4 checks passed
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.

1 participant