4,554
edits
No edit summary |
No edit summary |
||
Line 420: | Line 420: | ||
max-width: 100% !important; | max-width: 100% !important; | ||
height: auto !important; | height: auto !important; | ||
} | |||
} | |||
/* === Keep every label/body pair together (all engines) === */ | |||
@media print { | |||
/* 1) prevent a break right after the label */ | |||
.article-label-description, | |||
.article-label-reflection, | |||
.article-label-external-reference, | |||
.article-label-quote, | |||
.article-label-modification-date { | |||
page-break-after: avoid !important; | |||
break-after: avoid !important; | |||
} | |||
/* 2) prevent a break right before the body */ | |||
.article-label-description + .article-description, | |||
.article-label-reflection + .article-reflection, | |||
.article-label-external-reference + .article-external-reference, | |||
.article-label-quote + .article-quote, | |||
.article-label-modification-date + .article-modification-date { | |||
page-break-before: avoid !important; | |||
break-before: avoid !important; | |||
} | |||
/* 3) reduce “orphans” of the first line drifting to next page */ | |||
.article-description p, | |||
.article-reflection p, | |||
.article-external-reference p, | |||
.article-quote p { | |||
orphans: 2; | |||
widows: 2; | |||
page-break-inside: avoid; | |||
break-inside: avoid; | |||
} | |||
} | |||
/* === Blink-specific override (beats the earlier 'auto' rules) === */ | |||
@media print and (-webkit-min-device-pixel-ratio:0) { | |||
.article-label-description, | |||
.article-label-reflection, | |||
.article-label-external-reference, | |||
.article-label-quote, | |||
.article-label-modification-date { | |||
page-break-after: avoid !important; | |||
break-after: avoid !important; | |||
} | |||
.article-label-description + .article-description, | |||
.article-label-reflection + .article-reflection, | |||
.article-label-external-reference + .article-external-reference, | |||
.article-label-quote + .article-quote, | |||
.article-label-modification-date + .article-modification-date { | |||
page-break-before: avoid !important; | |||
break-before: avoid !important; | |||
} | } | ||
} | } |