MediaWiki:Print.css
Appearance
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.
/* MediaWiki:Print.css */ @media print { /* --- General Print Cleanup --- */ /* Remove navigation, sidebars, and other elements not needed for print */ #mw-navigation, #mw-panel, #p-cactions, #p-personal, #p-views, #p-navigation, #p-search, #siteSub, #footer, #catlinks, .noprint, .editsection, .mw-indicators, .printfooter, #privacy, #about, #disclaimer, #toc { display: none !important; } /* Adjust page margins for better print layout */ body { margin: 1.5cm; /* Roughly 0.6 inches on all sides */ } /* --- Header Sizing --- */ /* Reduce the size of main page title */ h1#firstHeading, #content h1 { font-size: 2em !important; /* Adjust as needed, e.g., 2em, 1.8em */ margin-top: 0.5em !important; margin-bottom: 0.8em !important; line-height: 1.2em !important; } /* Reduce the size of section headers */ h2, h3, h4, h5, h6 { font-size: 1.5em !important; /* Adjust for all sub-headers, e.g., 1.5em, 1.3em */ margin-top: 1em !important; margin-bottom: 0.5em !important; line-height: 1.3em !important; } /* You can make more specific adjustments if needed, e.g.: */ /* h2 { font-size: 1.4em !important; } */ /* h3 { font-size: 1.2em !important; } */ /* h4 { font-size: 1.1em !important; } */ /* --- Text & Paragraph Styling --- */ p, ul, ol, dl, pre, blockquote { font-size: 1em !important; /* Ensure body text is standard size */ line-height: 1.6em !important; /* Improve readability with line spacing */ margin-top: 0.5em !important; margin-bottom: 0.5em !important; } /* --- Image Styling (Basic) --- */ /* Ensure images don't break layout and are reasonably sized */ img { max-width: 100% !important; /* Prevents images from overflowing page */ height: auto !important; /* Maintains aspect ratio */ display: block; /* Ensures they act as blocks */ margin: 0.5em auto; /* Center images */ } /* Basic thumbnail style - might need more fine-tuning later if you want them smaller */ .thumb { float: none !important; /* Remove float for simpler print layout by default */ margin: 1em auto !important; /* Center the thumbnail */ max-width: 80% !important; /* Keep thumbnails from being too wide */ } .thumbinner, .thumbimage, .thumbcaption { box-sizing: border-box !important; /* Helps with consistent sizing */ } /* --- Column Layout Adjustments --- */ /* Force multi-column sections into a single column for print */ .module, .div-col { column-count: 1 !important; /* Ensure single column for print */ column-width: auto !important; column-rule: none !important; /* Remove column lines if present */ } .div-col li, .div-col dd, .div-col p { break-inside: avoid; /* Modern property to prevent content breaking in half */ } }