Spaces:
Runtime error
fix(schedule-print): force background colors and squeeze grid to 1 page
Browse filesDos issues post primer intento de PDF horario:
1. Backgrounds no se imprimian: browsers tienen "Background graphics"
en OFF por default en el dialogo de print, lo cual hace que los
bg-blue-100/emerald-100/etc no salgan. Agregada regla global
*,*::before,*::after { print-color-adjust: exact } que fuerza
impresion de fondos sin importar el setting del usuario.
2. PDF seguia generando 2 paginas. Apretadas mas las reglas print:
- margin @page : 0.35in -> 0.3in
- gap del grid: 2px (override de gap-1)
- min-h celdas: 28px (override de 40px compact)
- text-xs/sm: 9px font, line-height 1.15
- padding interno bloque: 1px 4px
- page-break-inside: avoid en grid y schedule-print-area para evitar
split a segunda pagina
Esto cubre escuela con 11 horas/dia x 5 dias = la grilla mas grande
posible.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
@@ -28,10 +28,18 @@
|
|
| 28 |
/* ββ Print / PDF styles βββββββββββββββββββββββββββββββββββββββββββββββββββ */
|
| 29 |
@page {
|
| 30 |
size: letter landscape;
|
| 31 |
-
margin: 0.
|
| 32 |
}
|
| 33 |
|
| 34 |
@media print {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 35 |
/* Hide everything by default via visibility (preserves layout for our absolute positioning) */
|
| 36 |
body * { visibility: hidden; }
|
| 37 |
|
|
@@ -48,8 +56,38 @@
|
|
| 48 |
overflow: visible !important;
|
| 49 |
max-height: none !important;
|
| 50 |
padding: 0 !important;
|
|
|
|
|
|
|
| 51 |
}
|
| 52 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 53 |
/* Modal overlay/box: kill background-color so they don't tint anything if visibility leaks */
|
| 54 |
.print-overlay {
|
| 55 |
background: transparent !important;
|
|
|
|
| 28 |
/* ββ Print / PDF styles βββββββββββββββββββββββββββββββββββββββββββββββββββ */
|
| 29 |
@page {
|
| 30 |
size: letter landscape;
|
| 31 |
+
margin: 0.3in;
|
| 32 |
}
|
| 33 |
|
| 34 |
@media print {
|
| 35 |
+
/* Force background colors / images to print regardless of browser's
|
| 36 |
+
"Background graphics" checkbox default. */
|
| 37 |
+
*, *::before, *::after {
|
| 38 |
+
-webkit-print-color-adjust: exact !important;
|
| 39 |
+
print-color-adjust: exact !important;
|
| 40 |
+
color-adjust: exact !important;
|
| 41 |
+
}
|
| 42 |
+
|
| 43 |
/* Hide everything by default via visibility (preserves layout for our absolute positioning) */
|
| 44 |
body * { visibility: hidden; }
|
| 45 |
|
|
|
|
| 56 |
overflow: visible !important;
|
| 57 |
max-height: none !important;
|
| 58 |
padding: 0 !important;
|
| 59 |
+
page-break-inside: avoid !important;
|
| 60 |
+
break-inside: avoid !important;
|
| 61 |
}
|
| 62 |
|
| 63 |
+
/* Prevent the grid itself from splitting across pages */
|
| 64 |
+
.schedule-print-area > div,
|
| 65 |
+
.schedule-print-area .grid {
|
| 66 |
+
page-break-inside: avoid !important;
|
| 67 |
+
break-inside: avoid !important;
|
| 68 |
+
}
|
| 69 |
+
|
| 70 |
+
/* Tighter spacing in print: override compact mode further to guarantee single-page fit */
|
| 71 |
+
.schedule-print-area .grid {
|
| 72 |
+
gap: 2px !important;
|
| 73 |
+
}
|
| 74 |
+
.schedule-print-area .grid > div {
|
| 75 |
+
min-height: 0 !important;
|
| 76 |
+
}
|
| 77 |
+
/* Each schedule cell (the dayΓslot box). min-h was 40px in compact; squeeze further. */
|
| 78 |
+
.schedule-print-area [class*='min-h-'] {
|
| 79 |
+
min-height: 28px !important;
|
| 80 |
+
}
|
| 81 |
+
/* Inner block padding super tight */
|
| 82 |
+
.schedule-print-area [class*='px-1.5'][class*='py-1'] {
|
| 83 |
+
padding: 1px 4px !important;
|
| 84 |
+
}
|
| 85 |
+
/* Text smaller */
|
| 86 |
+
.schedule-print-area .text-xs,
|
| 87 |
+
.schedule-print-area .text-sm {
|
| 88 |
+
font-size: 9px !important;
|
| 89 |
+
line-height: 1.15 !important;
|
| 90 |
+
}
|
| 91 |
/* Modal overlay/box: kill background-color so they don't tint anything if visibility leaks */
|
| 92 |
.print-overlay {
|
| 93 |
background: transparent !important;
|