From 1701a95183512965c1f08e37dae04ee3c2dd7e2c Mon Sep 17 00:00:00 2001 From: Connor Johnstone Date: Fri, 7 Nov 2025 16:30:26 -0500 Subject: [PATCH] Fix print preview to display all 6 rows for 6-week months MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The print preview was only showing 5 rows for months requiring 6 rows (like November 2025). The issue was that the .calendar container uses flexbox layout, but the grid wasn't properly constrained to fit within the fixed paper height. Changes: - Set explicit height: 100% on .print-preview-paper .calendar - Use flex: 1 on calendar-grid to fill remaining space after header - Add min-height: 0 to both calendar-grid and calendar-day to allow flexbox items to shrink below their content size This allows the CSS Grid's repeat(6, 1fr) to properly distribute all 6 rows evenly within the available space while maintaining the fixed paper dimensions for consistent printing. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- frontend/print-preview.css | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/frontend/print-preview.css b/frontend/print-preview.css index 0bdcca0..768c6ed 100644 --- a/frontend/print-preview.css +++ b/frontend/print-preview.css @@ -201,6 +201,21 @@ overflow: hidden; } +/* Ensure calendar and grid have proper height constraints for row distribution */ +.print-preview-paper .calendar { + height: 100%; +} + +.print-preview-paper .calendar-grid { + flex: 1 !important; /* Fill remaining space after header in flex container */ + min-height: 0 !important; /* Allow grid to shrink below content size in flexbox */ + height: auto !important; /* Override the calc() from base styles */ +} + +.print-preview-paper .calendar-day { + min-height: 0 !important; /* Allow day cells to shrink to fit in grid rows */ +} + /* Hide UI elements in preview */ .print-preview-paper .app-sidebar, .print-preview-paper .print-button,