1
0
Fork 0

enable backgrounds images when printing to pdf (closes #271)

This commit is contained in:
Hakim El Hattab 2013-02-03 16:17:46 -05:00
parent 11fc906add
commit 6b0fff3512
1 changed files with 14 additions and 15 deletions

View File

@ -2,16 +2,17 @@
by Rob Glazebrook of CSSnewbie.com by Rob Glazebrook of CSSnewbie.com
Last Updated: June 4, 2008 Last Updated: June 4, 2008
Feel free (nay, compelled) to edit, append, and Feel free (nay, compelled) to edit, append, and
manipulate this file as you see fit. */ manipulate this file as you see fit. */
/* SECTION 1: Set default width, margin, float, and /* SECTION 1: Set default width, margin, float, and
background. This prevents elements from extending background. This prevents elements from extending
beyond the edge of the printed page, and prevents beyond the edge of the printed page, and prevents
unnecessary background images from printing */ unnecessary background images from printing */
* { * {
-webkit-print-color-adjust: exact; -webkit-print-color-adjust: exact;
} }
body { body {
@ -19,24 +20,22 @@ body {
width: auto; width: auto;
height: auto; height: auto;
border: 0; border: 0;
margin: 0 5%;
padding: 0; padding: 0;
float: none !important; float: none !important;
overflow: visible; overflow: visible;
background-image: none !important;
} }
html { html {
width: auto; width: 100%;
height: auto; height: 100%;
overflow: visible; overflow: visible;
} }
/* SECTION 2: Remove any elements not needed in print. /* SECTION 2: Remove any elements not needed in print.
This would include navigation, ads, sidebars, etc. */ This would include navigation, ads, sidebars, etc. */
.nestedarrow, .nestedarrow,
.controls, .controls,
.reveal .progress, .reveal .progress,
.reveal.overview, .reveal.overview,
.fork-reveal, .fork-reveal,
.share-reveal, .share-reveal,
@ -60,7 +59,7 @@ h1,h2,h3,h4,h5,h6 {
/* SECTION 5: Make hyperlinks more usable. /* SECTION 5: Make hyperlinks more usable.
Ensure links are underlined, and consider appending Ensure links are underlined, and consider appending
the URL to the end of the link for usability. */ the URL to the end of the link for usability. */
a:link, a:link,
a:visited { a:visited {
font-weight: bold; font-weight: bold;
text-decoration: underline; text-decoration: underline;
@ -106,7 +105,7 @@ ul, ol, div, p {
} }
.reveal .slides section { .reveal .slides section {
page-break-after: always !important; page-break-after: always !important;
visibility: visible !important; visibility: visible !important;
position: static !important; position: static !important;
@ -137,12 +136,12 @@ ul, ol, div, p {
.reveal section.stack { .reveal section.stack {
margin: 0px !important; margin: 0px !important;
padding: 0px !important; padding: 0px !important;
page-break-after: avoid !important; page-break-after: avoid !important;
} }
.reveal section .fragment { .reveal section .fragment {
opacity: 1 !important; opacity: 1 !important;
visibility: visible !important; visibility: visible !important;
-webkit-transform: none !important; -webkit-transform: none !important;
-moz-transform: none !important; -moz-transform: none !important;
-ms-transform: none !important; -ms-transform: none !important;