Difference between revisions of "MediaWiki:Print.css"

From LID SWM Planning and Design Guide
Jump to navigation Jump to search
(Created page with "/* Do not print: 1: When in mainspace: Article message boxes, navboxes, sister project boxes, disambig links, and items marked as metadata. 2: section edit l...")
 
Line 20: Line 20:
 
th .sortkey, td .sortkey,
 
th .sortkey, td .sortkey,
 
#mw-revision-nav {
 
#mw-revision-nav {
     display: none !important;
+
     display: none !important;}
}
 
  
 
/* Add formatting to make sure that "external references" from templates
 
/* Add formatting to make sure that "external references" from templates
Line 32: Line 31:
 
.nourlexpansion a.external.text:after,
 
.nourlexpansion a.external.text:after,
 
.nourlexpansion a.external.autonumber:after {
 
.nourlexpansion a.external.autonumber:after {
     display: none !important;
+
     display: none !important;}
}
 
  
 
/* Uncollapse collapsible tables/divs.
 
/* Uncollapse collapsible tables/divs.
Line 40: Line 38:
 
*/
 
*/
 
table.collapsible tr, div.NavPic, div.NavContent {
 
table.collapsible tr, div.NavPic, div.NavContent {
     display: block !important;
+
     display: block !important;}
}
 
 
table.collapsible tr {
 
table.collapsible tr {
     display: table-row !important;
+
     display: table-row !important;}
}
 
 
.mw-parser-output .mw-collapsed .mw-collapsible-content {
 
.mw-parser-output .mw-collapsed .mw-collapsible-content {
display: block !important;
+
display: block !important;}
}
 
 
.mw-parser-output table.mw-collapsed > * > tr {
 
.mw-parser-output table.mw-collapsed > * > tr {
display: table-row !important;
+
display: table-row !important;}
}
 
 
.mw-parser-output ol.mw-collapsed > li,
 
.mw-parser-output ol.mw-collapsed > li,
 
.mw-parser-output ul.mw-collapsed > li {
 
.mw-parser-output ul.mw-collapsed > li {
display: list-item !important;
+
display: list-item !important;}
}
 
  
 
/* On websites with siteSub visible, the margin on the firstHeading is not needed. */
 
/* On websites with siteSub visible, the margin on the firstHeading is not needed. */
 
#firstHeading {
 
#firstHeading {
     margin: 0;
+
     margin: 0;}
}
 
  
 
/* We don't want very long URLs (that are added to the content in print) to widen the canvas */
 
/* 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;
+
word-wrap: break-word;}
}
 
  
 
/*  
 
/*  
Line 75: Line 66:
 
   background-color: #fff;
 
   background-color: #fff;
 
   border-spacing: 0;
 
   border-spacing: 0;
   border-collapse: collapse;
+
   border-collapse: collapse;}
}
 
  
 
.infobox > * > tr > td,
 
.infobox > * > tr > td,
 
.infobox > * > tr > th {
 
.infobox > * > tr > th {
 
padding: 2px 5px;
 
padding: 2px 5px;
border-bottom: 1px solid #EAECF0;
+
border-bottom: 1px solid #EAECF0; }
}
 
  
 
/* Reduce noise for print medium - labels may be links */
 
/* Reduce noise for print medium - labels may be links */
Line 89: Line 78:
 
.infobox > * > tr:last-child > th,
 
.infobox > * > tr:last-child > th,
 
.infobox > * > tr:last-child > td {
 
.infobox > * > tr:last-child > td {
border: 0;
+
border: 0;}
}
 
  
 
/* References */
 
/* References */
Line 96: Line 84:
 
.references a,
 
.references a,
 
.reference a {
 
.reference a {
     color: black !important;
+
     color: black !important;}
}
 
  
 
/* Can be removed when T172501 is resolved */
 
/* Can be removed when T172501 is resolved */
 
sup, sub {
 
sup, sub {
line-height: 1;
+
line-height: 1;}
}
 
 
sup.reference {
 
sup.reference {
font-family: sans-serif;
+
font-family: sans-serif;}
}
 
  
 
.reference a {
 
.reference a {
border-bottom: 0;
+
border-bottom: 0;}
}
 
  
 
ol.references,
 
ol.references,
Line 116: Line 100:
 
cite * {
 
cite * {
 
/* Override any editor added inline styles that play with font-size */
 
/* Override any editor added inline styles that play with font-size */
font-size: inherit !important;
+
font-size: inherit !important;}
}
 
  
 
.refbegin  li,
 
.refbegin  li,
 
.references li{
 
.references li{
 
color: #666;
 
color: #666;
line-height: 14pt;
+
line-height: 14pt;}
}
 

Revision as of 13:28, 13 September 2017

/* 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.
*/
.ns-0 .ambox,
.ns-0 .navbox,
.ns-0 .vertical-navbox,
.ns-0 .infobox.sisterproject,
.ns-0 .hatnote,
.ns-0 .dablink,
.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.
   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.NavPic, 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.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;}

.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;}

/* Can be removed when T172501 is resolved */
sup, sub {
	line-height: 1;}
sup.reference {
	font-family: sans-serif;}

.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;}