MediaWiki:Print.css

From Help Wiki
Revision as of 10:05, 16 September 2019 by Greenea (Talk | contribs) (Created page with "CSS placed here will affect the print output: /* Do not print: 1: When in mainspace: Article message boxes, navboxes, sister project boxes, disambig links,...")

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

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: Clear the cache in Tools → Preferences
/* CSS placed here will affect the print output */

/* Do not print:
   1: When in mainspace: Article message boxes,
      navboxes, sister project boxes, disambig links,
      and items marked as metadata.
   2: section edit links.
   3: navbar links.
   4: Show/hide toggles for collapsible items.
*/
#p-search,
.navbar-right-aligned,
.footer,
#p-logo,
.editlink,
.navbar,
a.NavToggle, span.collapseButton, span.mw-collapsible-toggle,
th .sortkey, td .sortkey,
#mw-revision-nav {
	display: none !important;
}

/* reduce margin*/
#content {
    margin: 1em;
}

/* Add formatting to make sure that "external references" from templates
   like [[Template:Ref]] do not get URL expansion, not even when printed.
   The anchor itself has class "external autonumber" and the url expansion
   is inserted when printing (see the common printing style sheet at
   http://en.wikipedia.org/w/skins/common/commonPrint.css) using the
   ":after" pseudo-element of CSS.
*/
.nourlexpansion a.external.text:after,
.nourlexpansion a.external.autonumber:after {
	display: none !important;
}

/* Uncollapse collapsible tables/divs.
   The proper way to do this for tables is to use display:table-row,
   but this is not supported by all browsers, so use display:block as fallback.
*/
table.collapsible tr, div.NavContent {
	display: block !important;
}
table.collapsible tr {
	display: table-row !important;
}
.mw-parser-output .mw-collapsed .mw-collapsible-content {
	display: block !important;
}
.mw-parser-output table.mw-collapsed > * > tr {
	display: table-row !important;
}
.mw-parser-output ol.mw-collapsed > li,
.mw-parser-output ul.mw-collapsed > li {
	display: list-item !important;
}