MediaWiki:Print.css
From 1MinuteSite Wiki
Note: After saving, 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)
- Internet Explorer: Hold Ctrl while clicking Refresh, or press Ctrl-F5
- Opera: Go to Menu → Settings (Opera → Preferences on a Mac) and then to Privacy & security → Clear browsing data → Cached images and files.
<p> <p>/* <syntaxhighlight lang="css"> */</p> <p> </p> <p>/* Do not print:</p> <p> 1: When in mainspace: Article message boxes,</p> <p> navboxes, sister project boxes, disambig links,</p> <p> and items marked as metadata.</p> <p> 2: Privacy, about, disclaimer, redirect and section edit links.</p> <p> 3: Show/hide toggles for collapsible items.</p> <p> 4: Items marked as noprint.</p> <p>*/</p> <p>.ns-0 .ambox, </p> <p>.ns-0 .navbox, </p> <p>.ns-0 .infobox.sisterproject, </p> <p>.ns-0 .dablink, </p> <p>.ns-0 .metadata,</p> <p>#filetoc, </p> <p>#footer-places,</p> <p>.editlink,</p> <p>span.collapseButton, a.NavToggle,</p> <p>.noprint {</p> <p> display: none;</p> <p>}</p> <p> </p> <p>/* Add formatting to make sure that "external references" from templates</p> <p> like [[Template:Ref]] do not get URL expansion, not even when printed.</p> <p> The anchor itself has class "external autonumber" and the url expansion</p> <p> is inserted when printing (see the common printing style sheet at</p> <p> http://en.wikipedia.org/skins-1.5/common/commonPrint.css) using the</p> <p> ":after" pseudo-element of CSS. Also hide in <cite> elements.</p> <p>*/</p> <p>#content cite a.external.text:after,</p> <p>.nourlexpansion a.external.text:after,</p> <p>.nourlexpansion a.external.autonumber:after {</p> <p> display: none !important;</p> <p>}</p> <p> </p> <p>/* Uncollapse collapsible tables/divs.</p> <p> The proper way to do this for tables is to use display:table-row,</p> <p> but this is not supported by all browsers, so use display:block as fallback.</p> <p>*/</p> <p>table.collapsible tr, div.NavPic, div.NavContent {</p> <p> display: block !important;</p> <p>}</p> <p>table.collapsible tr {</p> <p> display: table-row !important;</p> <p>}</p> <p> </p> <p>/* Hiding some items when printing with Simple skin */</p> <p>.skin-simple div#column-one,</p> <p>.skin-simple div#f-poweredbyico,</p> <p>.skin-simple div#f-copyrightico,</p> <p>.skin-simple .editsection { </p> <p> display: none; </p> <p>}</p> <p> </p> <p>/* wikitable class for skinning normal tables */</p> <p>table.wikitable {</p> <p> margin: 1em 1em 1em 0;</p> <p> border: 1px #aaa solid;</p> <p> border-collapse: collapse;</p> <p>}</p> <p>.wikitable th, .wikitable td {</p> <p> border: 1px #aaa solid;</p> <p> padding: 0.2em;</p> <p>}</p> <p>.wikitable th {</p> <p> text-align: center;</p> <p> background: #F2F2F2;</p> <p> font-weight: bold;</p> <p>}</p> <p>.wikitable caption {</p> <p> font-weight: bold;</p> <p>}</p> <p> </p> <p>/* On websites with siteSub visible, the margin on the firstHeading is not needed. */</p> <p>#firstHeading {</p> <p> margin: 0px;</p> <p>}</p> <p> </p> <p>/* Remove once r76522 is live */</p> <p>.wikitable, .thumb, img {</p> <p><span style="white-space: pre;"> </span>page-break-inside: avoid;</p> <p>}</p> <p>h2, h3, h4, h5, h6, h7 {</p> <p><span style="white-space: pre;"> </span>page-break-after: avoid;</p> <p>}</p> <p>p {</p> <p><span style="white-space: pre;"> </span>widows: 3;</p> <p><span style="white-space: pre;"> </span>orphans: 3;</p> <p>}</p> <p> </p> <p>/* </syntaxhighlight> */</p> </p>