KNACSS/css/08-print.css

89 lines
No EOL
1.4 KiB
CSS

/* quick print reset */
@media print {
* {
background: transparent !important;
-webkit-box-shadow: none !important;
box-shadow: none !important;
text-shadow: none !important;
}
body {
width: auto !important;
margin: auto !important;
font-family: serif;
font-size: 12pt;
background-color: #fff !important;
color: #333 !important;
}
p,
h1,
h2,
h3,
h4,
h5,
h6,
blockquote,
ul,
ol {
color: #000 !important;
margin: auto !important;
}
.print {
display: block;
/* displaying .print elements */
}
img {
-webkit-filter: grayscale(100%);
-moz-filter: grayscale(100%);
-ms-filter: grayscale(100%);
-o-filter: grayscale(100%);
filter: grayscale(100%);
}
p,
blockquote {
orphans: 3;
/* no orphans */
widows: 3;
/* no widows */
}
blockquote,
ul,
ol {
page-break-inside: avoid;
/* no breaks inside these elements */
}
h1 {
page-break-before: always;
/* page break before main headers */
}
h1,
h2,
h3,
caption {
page-break-after: avoid;
/* no breaks after these elements */
}
a {
color: #000 !important;
text-decoration: underline !important;
}
a[href]:after {
content: " (" attr(href) ")";
/* displaying URLs */
}
a[href^="javascript:"]:after,
a[href^="#"]:after {
content: "";
}
}