MediaWiki:Print.css
Jump to navigation
Jump to search
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.
/* CSS placed here will affect the print output */
body, #globalWrapper, #column-content, #content, #bodyContent, @media print {
font-family: "fedra";
}
@font-face {
font-family: "fedra";
src: url("FedraSans-Light.ttf");
font-style:normal;
}
@font-face {
font-family: "fedra";
src: url("FedraSans-Medium.ttf");
font-weight:bold;
}
@font-face {
font-family: "fedra";
src: url("FedraSans-LightItalic.ttf");
font-style:italic;
}
/* list items to blocks */
#content ul li {
padding-left: 0;
text-indent: 0;
}
#content ul li ul li {
padding-left: 1em;
}
/* language symbol in bibliography */
.languageicon {
font-style: italic !important;
font-weight: normal !important;
}
/* this via https://en.wikipedia.org/wiki/MediaWiki:Print.css, 20 Aug 2024 */
/* Do not print */
.ns-0 .metadata, /* items in mainspace marked as metadata */
.editlink, /* section edit links */
.mw-collapsible-toggle, /* Show/hide toggles for collapsible items. */
#mw-revision-nav, /* revision navigation on a permalink */
/* 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 using the ":after" pseudo-element of CSS. See
mediawiki.skinning/content.tables-print.less
*/
.nourlexpansion a.external.text::after,
.nourlexpansion a.external.autonumber::after {
display: none !important;
}
/* Uncollapse collapsible things
* See also [[phab:T152330]]
*/
.mw-parser-output .mw-collapsed,
.mw-parser-output .mw-collapsed .mw-collapsible-content,
.mw-parser-output .mw-collapsed > li,
.mw-parser-output .mw-collapsed tr {
/* fallback for browser versions that don't yet support revert
* on the support graph that's only grade C/X, so review this at a later date
*/
display: initial !important;
display: revert !important; /* revert works better for tables */
}
/* On websites with siteSub visible, the margin on the firstHeading is not needed. */
#firstHeading {
margin: 0;
}
/* We don't want very long URLs (that are added to the content in print) to widen the canvas */
#content a.external.text::after,
#content a.external.autonumber::after {
word-wrap: break-word;
}
/*
- Basic infobox styling
- Remove background colors, they are hard to print
*/
.infobox {
border: solid 1px #aaa;
background-color: #fff;
border-spacing: 0;
border-collapse: collapse;
width: 180pt !important; /*T174957*/
}
.infobox > * > tr > td,
.infobox > * > tr > th {
padding: 2px 5px;
border-bottom: 1px solid #EAECF0;
}
/* Reduce noise for print medium - labels may be links */
.infobox a,
/* reset last border (set above) of infobox */
.infobox > * > tr:last-child > th,
.infobox > * > tr:last-child > td {
border: 0;
}
/* Page body */
div#content {
margin-top: 0;
padding-top: .3em;
padding-bottom: .3em;
padding-right: 0;
font-size: 1em;
color: black;
border-top: none;
border-bottom: none;
}
#mw-content-text li {
padding-top: 0em;
padding-bottom: 0;
font-size: .8em;
margin-left:0;
margin-right: 1em;
line-height: 1.6em;
}