Fix event positioning in print copy with dynamic base-unit recalculation
- Measure actual print copy div height after aspect-ratio scaling - Recalculate base-unit based on measured height vs original 720px assumption - Apply position scaling to .week-event elements in print copy only - Parse and recalculate top/height pixel values using scale factor - Add landscape orientation and fit-to-page CSS hints for better printing - Preserve hour filtering with proper data attributes and CSS variables This ensures events display correctly when print copy is scaled to fit page while maintaining proper aspect ratio and hour range filtering. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
		| @@ -1128,7 +1128,7 @@ | ||||
| .print-preview-paper[data-start-hour="7"][data-end-hour="19"]:has(.time-slot.quarter-mode) .time-labels, | ||||
| .print-preview-paper[data-start-hour="7"][data-end-hour="19"]:has(.time-slot.quarter-mode) .week-days-grid { min-height: 1530px !important; } | ||||
|  | ||||
| /* Print Page Setup - Force landscape orientation */ | ||||
| /* Print Page Setup - Force landscape orientation and fit to page */ | ||||
| @page { | ||||
|     size: landscape; | ||||
|     margin: 0.5in; | ||||
| @@ -1136,6 +1136,11 @@ | ||||
|  | ||||
| /* Print Media Rules - Show only the print-preview-copy when printing */ | ||||
| @media print { | ||||
|     html { | ||||
|         print-color-adjust: exact; /* Preserve colors when printing */ | ||||
|         -webkit-print-color-adjust: exact; | ||||
|     } | ||||
|      | ||||
|     /* Hide all top-level app content */ | ||||
|     .app { | ||||
|         display: none !important; | ||||
| @@ -1147,11 +1152,19 @@ | ||||
|         position: absolute !important; | ||||
|         left: 0 !important; | ||||
|         top: 0 !important; | ||||
|         width: 960px !important; | ||||
|         height: 720px !important; | ||||
|         /* width: 960px !important; */ | ||||
|         /* height: 720px !important; */ | ||||
|         aspect-ratio: 1.2941176470588236 !important; | ||||
|         margin: 0 !important; | ||||
|         padding: 0 !important; | ||||
|         box-sizing: border-box !important; | ||||
|         /* Properties to help browsers scale to fit page */ | ||||
|         max-width: 100vw; | ||||
|         max-height: 100vh; | ||||
|         object-fit: contain; | ||||
|         page-break-inside: avoid; | ||||
|         orphans: 1; | ||||
|         widows: 1; | ||||
|     } | ||||
|      | ||||
|     /* Ensure print content uses the full page */ | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Connor Johnstone
					Connor Johnstone