baz_april/squelettes/scss/base/_print.scss

132 lines
2.8 KiB
SCSS

@media print {
@page {
margin: 2cm .5cm;
}
/* Fixe un bug délirant de Edge au print */
html {
-ms-overflow-style: -ms-autohiding-scrollbar;
}
body,
html {
background-color: #FFF !important;
color: #000 !important;
background-image: none;
border: 0;
box-shadow: none;
float: none;
height: auto;
margin: 0;
width: 100% !important;
max-width: 100% !important;
min-height: 0;
padding: 0;
position: static;
opacity: 1;
visibility: visible;
max-height: none;
display: block;
}
body {
padding: .5em;
overflow: auto;
}
/* éviter saut de page hasardeux */
blockquote, ul, ol {
page-break-inside: avoid;
}
h1, h2, h3, caption {
page-break-after: avoid;
}
#spip-admin,
.content-aside {
display: none !important;
}
*,
*:before,
*:after {
background: transparent !important;
color: #000 !important;
/* Black prints faster: http://www.sanbeiji.com/archives/953 */
box-shadow: none !important;
text-shadow: none !important;
//-webkit-filter: grayscale(100%);
//filter: grayscale(100%);
}
a,
a:visited {
color: #000 !important;
text-decoration: underline !important;
}
a:after {
content: '';
}
a[rel="external"]:after,
a.spip_out:after {
content: " (" attr(href) ")";
}
/*
* Don't show links that are fragment identifiers,
* or use the `javascript:` pseudo protocol
*/
a[href^="#"]:after,
a[href^="javascript:"]:after {
content: "";
}
abbr[title]:after {
content: " (" attr(title) ")";
}
/* éviter saut de page hasardeux */
blockquote, ul, ol {
page-break-inside: avoid; /* pas de coupure dans ces élements */
}
h1, h2, h3, caption {
margin-bottom: 16pt !important;
page-break-after: avoid; /* pas de saut après ces éléments */
}
/*
* Printing Tables:
* http://css-discuss.incutio.com/wiki/Printing_Tables
*/
thead {
display: table-header-group;
}
tr,
img {
page-break-inside: avoid;
}
img {
max-width: 100% !important;
}
p, blockquote {
orphans: 3; /* pas de ligne seule en bas */
widows: 3; /* pas de ligne seule en haut */
}
.noprint,
.no-print {
display: none !important;
}
.print,
.onlyprint,
.only-print {
display: block !important;
}
}