Jump to content

MediaWiki:Print.css

From Costa Sano KB
Revision as of 13:39, 11 May 2026 by Mngr (talk | contribs) (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; }")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Note: After publishing, you may have to bypass your browser's cache to see the changes.

  • Firefox / Safari: Hold Shift while clicking Reload, or press either Ctrl-F5 or Ctrl-R (⌘-R on a Mac)
  • Google Chrome: Press Ctrl-Shift-R (⌘-Shift-R on a Mac)
  • Edge: Hold Ctrl while clicking Refresh, or press Ctrl-F5.
/* 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;
}