Difference between revisions of "MediaWiki:Print.css"

From LinnDocs
Jump to: navigation, search
m
m
 
(6 intermediate revisions by the same user not shown)
Line 1: Line 1:
 
/* CSS placed here will affect the print output */
 
/* CSS placed here will affect the print output */
  
#siteSub { display: none; }  
+
@media print {
#firstHeading { diplay:none;}
+
    #footer,
.printfooter { display: none; }
+
    #content,
 
+
    body { font-size: 8pt !important; }
/* Do not print:
+
    h1 { font-size: 14pt }
  1: When in mainspace: Article message boxes,
+
    h2 { font-size: 12pt }
      navboxes, sister project boxes, disambig links,
+
    h3 { font-size: 11pt }
      and items marked as metadata.
+
    h4 { font-size: 9pt }
  2: section edit links.
+
    h5 { font-size: 8pt }
  3: navbar links.
+
    h6 {
  4: Show/hide toggles for collapsible items.
+
        font-size: 8pt;
*/
+
        font-weight: normal;
.ns--1 .ambox,
+
    }
.ns-0 .ambox,
+
    #catlinks, .catlinks { display: none; }
.ns--1 .navbox,
+
    #footer { display: none; }
.ns-0 .navbox,
+
    .printfooter { display: none; }
.ns--1 .vertical-navbox,
+
    #siteSub {  display: none; }
.ns-0 .vertical-navbox,
+
    #firstHeading { diplay:none;}
.ns--1 .infobox.sisterproject,
+
    ol.references {display: none;}
.ns-0 .infobox.sisterproject,
 
.ns--1 .hatnote,
 
.ns-0 .hatnote,
 
.ns--1 .dablink,
 
.ns-0 .dablink,
 
.ns--1 .metadata,
 
.ns-0 .metadata,
 
.sistersitebox,
 
.editlink,
 
.navbar,
 
a.NavToggle, span.collapseButton, span.mw-collapsible-toggle,
 
th .sortkey, td .sortkey,
 
#mw-revision-nav {
 
display: none !important;
 
 
}
 
}
  
/* 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.
+
/* disable external links from showing in the printable version of a page */
  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;
 
}
 
  
/* 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.text:after,
 
#content a.external.autonumber:after {
 
#content a.external.autonumber:after {
word-wrap: break-word;
+
content: none;
}
 
 
 
/*
 
- 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;
 
}
 
 
 
/* References */
 
.refbegin a,
 
.references a,
 
.reference a {
 
color: black !important;
 
}
 
 
 
.reference a {
 
border-bottom: 0;
 
}
 
 
 
ol.references,
 
div.reflist,
 
div.refbegin,
 
cite * {
 
/* Override any editor added inline styles that play with font-size */
 
font-size: inherit !important;
 
}
 
 
 
.refbegin  li,
 
.references li{
 
color: #666;
 
line-height: 14pt;
 
}
 
 
 
.printfooter {
 
clear:both;
 
 
}
 
}

Latest revision as of 16:20, 20 November 2019

/* CSS placed here will affect the print output */

@media print {
    #footer,
    #content,
    body { font-size: 8pt !important; }
    h1 { font-size: 14pt }
    h2 { font-size: 12pt }
    h3 { font-size: 11pt }
    h4 { font-size: 9pt }
    h5 { font-size: 8pt }
    h6 {
        font-size: 8pt;
        font-weight: normal;
    }
    #catlinks, .catlinks { display: none; }
    #footer { display: none; }
    .printfooter { display: none; }
    #siteSub {  display: none; } 
    #firstHeading { diplay:none;}
    ol.references {display: none;}
}


/* disable external links from showing in the printable version of a page */

#content a.external.text:after,
#content a.external.autonumber:after {
	content: none;
}