Jump to content

MediaWiki:Print.css: Difference between revisions

From Costa Sano KB
Created page with "CSS placed here will affect the print output: Remove forced page break before special pages: .mw-specialpage { break-before: avoid !important; page-break-before: avoid !important; } Ensure readable print colors: body, .mw-body, #content { color: black !important; background: white !important; } Prevent headings from forcing page breaks: h1, h2, h3 { break-after: avoid !important; page-break-after: avoid !important; }"
 
No edit summary
Line 1: Line 1:
/* CSS placed here will affect the print output */
/* CSS placed here will affect the print output */


/* Remove forced page break before special pages */
/* Force all printed text to black */
.mw-specialpage {
* {
  break-before: avoid !important;
  page-break-before: avoid !important;
}
 
/* Ensure readable print colors */
body, .mw-body, #content {
   color: black !important;
   color: black !important;
   background: white !important;
   background: transparent !important;
}
 
/* Prevent headings from forcing page breaks */
h1, h2, h3 {
  break-after: avoid !important;
  page-break-after: avoid !important;
}
}

Revision as of 13:43, 11 May 2026

/* CSS placed here will affect the print output */

/* Force all printed text to black */
* {
  color: black !important;
  background: transparent !important;
}