MediaWiki:Print.css

From 1MinuteSite Wiki
Revision as of 14:54, 10 February 2011 by Admin (talk | contribs)

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>/* &lt;syntaxhighlight lang="css"&gt; */</p>
<p>&nbsp;</p>
<p>/* Do not print:</p>
<p>&nbsp;&nbsp; 1: When in mainspace: Article message boxes,</p>
<p>&nbsp;&nbsp; &nbsp; &nbsp;navboxes, sister project boxes, disambig links,</p>
<p>&nbsp;&nbsp; &nbsp; &nbsp;and items marked as metadata.</p>
<p>&nbsp;&nbsp; 2: Privacy, about, disclaimer, redirect and section edit links.</p>
<p>&nbsp;&nbsp; 3: Show/hide toggles for collapsible items.</p>
<p>&nbsp;&nbsp; 4: Items marked as noprint.</p>
<p>*/</p>
<p>.ns-0 .ambox,&nbsp;</p>
<p>.ns-0 .navbox,&nbsp;</p>
<p>.ns-0 .infobox.sisterproject,&nbsp;</p>
<p>.ns-0 .dablink,&nbsp;</p>
<p>.ns-0 .metadata,</p>
<p>#filetoc,&nbsp;</p>
<p>#footer-places,</p>
<p>.editlink,</p>
<p>span.collapseButton, a.NavToggle,</p>
<p>.noprint {</p>
<p>&nbsp;&nbsp; &nbsp;display: none;</p>
<p>}</p>
<p>&nbsp;</p>
<p>/* Add formatting to make sure that "external references" from templates</p>
<p>&nbsp;&nbsp; like [[Template:Ref]] do not get URL expansion, not even when printed.</p>
<p>&nbsp;&nbsp; The anchor itself has class "external autonumber" and the url expansion</p>
<p>&nbsp;&nbsp; is inserted when printing (see the common printing style sheet at</p>
<p>&nbsp;&nbsp; http://en.wikipedia.org/skins-1.5/common/commonPrint.css) using the</p>
<p>&nbsp;&nbsp; ":after" pseudo-element of CSS. Also hide in &lt;cite&gt; 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>&nbsp;&nbsp; &nbsp;display: none !important;</p>
<p>}</p>
<p>&nbsp;</p>
<p>/* Uncollapse collapsible tables/divs.</p>
<p>&nbsp;&nbsp; The proper way to do this for tables is to use display:table-row,</p>
<p>&nbsp;&nbsp; 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>&nbsp;&nbsp; &nbsp;display: block !important;</p>
<p>}</p>
<p>table.collapsible tr {</p>
<p>&nbsp;&nbsp; &nbsp;display: table-row !important;</p>
<p>}</p>
<p>&nbsp;</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 {&nbsp;</p>
<p>&nbsp;&nbsp; &nbsp;display: none;&nbsp;</p>
<p>}</p>
<p>&nbsp;</p>
<p>/* wikitable class for skinning normal tables */</p>
<p>table.wikitable {</p>
<p>&nbsp;&nbsp; &nbsp;margin: 1em 1em 1em 0;</p>
<p>&nbsp;&nbsp; &nbsp;border: 1px #aaa solid;</p>
<p>&nbsp;&nbsp; &nbsp;border-collapse: collapse;</p>
<p>}</p>
<p>.wikitable th, .wikitable td {</p>
<p>&nbsp;&nbsp; &nbsp;border: 1px #aaa solid;</p>
<p>&nbsp;&nbsp; &nbsp;padding: 0.2em;</p>
<p>}</p>
<p>.wikitable th {</p>
<p>&nbsp;&nbsp; &nbsp;text-align: center;</p>
<p>&nbsp;&nbsp; &nbsp;background: #F2F2F2;</p>
<p>&nbsp;&nbsp; &nbsp;font-weight: bold;</p>
<p>}</p>
<p>.wikitable caption {</p>
<p>&nbsp;&nbsp; &nbsp;font-weight: bold;</p>
<p>}</p>
<p>&nbsp;</p>
<p>/* On websites with siteSub visible, the margin on the firstHeading is not needed. */</p>
<p>#firstHeading {</p>
<p>&nbsp;&nbsp; &nbsp;margin: 0px;</p>
<p>}</p>
<p>&nbsp;</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>&nbsp;</p>
<p>/* &lt;/syntaxhighlight&gt; */</p>
</p>