Skip to content

Commit c79072e

Browse files
committed
fix: remove aggressive page-break rules that cause blank pages
1 parent 03b5e70 commit c79072e

2 files changed

Lines changed: 2 additions & 30 deletions

File tree

src/renderer/src/styles/print.css

Lines changed: 2 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
@media print {
2-
/* Prevent page breaks inside elements */
2+
/* Prevent page breaks inside small elements */
33
.prose h1,
44
.prose h2,
55
.prose h3,
@@ -11,22 +11,6 @@
1111
page-break-inside: avoid;
1212
}
1313

14-
/* Keep headings with following content */
15-
.prose h1,
16-
.prose h2,
17-
.prose h3,
18-
.prose h4,
19-
.prose h5,
20-
.prose h6 {
21-
page-break-after: avoid;
22-
}
23-
24-
/* Keep list items together */
25-
.prose ul,
26-
.prose ol {
27-
page-break-inside: avoid;
28-
}
29-
3014
.prose h2 {
3115
font-size: 24pt;
3216
}
@@ -40,11 +24,7 @@
4024
page-break-before: always;
4125
}
4226

43-
/* Keep important sections together */
44-
.notes-section {
45-
page-break-inside: avoid;
46-
}
47-
27+
/* Keep small sections together */
4828
.doctors-section {
4929
page-break-inside: avoid;
5030
}
@@ -55,7 +35,6 @@
5535

5636
.header-section {
5737
page-break-inside: avoid;
58-
page-break-after: avoid;
5938
}
6039

6140
@page {

src/renderer/src/styles/screen.css

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -537,7 +537,6 @@ body {
537537
/* Notes section styling */
538538
.notes-section {
539539
margin-top: 12px;
540-
page-break-inside: avoid;
541540
}
542541

543542
.section-header {
@@ -546,12 +545,6 @@ body {
546545
padding-bottom: 4px;
547546
margin-bottom: 8px;
548547
font-size: 18px;
549-
page-break-after: avoid;
550-
}
551-
552-
/* Prevent orphaned headers - keep with following content */
553-
.section-header + .prose {
554-
page-break-before: avoid;
555548
}
556549

557550
/* Print button */

0 commit comments

Comments
 (0)