Christophe Dervieux | e1893ae | 2021-10-07 17:09:02 +0200 | [diff] [blame] | 1 | /** |
| 2 | * This stylesheet is used to print reveal.js |
| 3 | * presentations to PDF. |
| 4 | * |
| 5 | * https://revealjs.com/pdf-export/ |
| 6 | */ |
| 7 | |
| 8 | html.print-pdf { |
| 9 | * { |
| 10 | -webkit-print-color-adjust: exact; |
| 11 | } |
| 12 | |
| 13 | & { |
| 14 | width: 100%; |
| 15 | height: 100%; |
| 16 | overflow: visible; |
| 17 | } |
| 18 | |
| 19 | body { |
| 20 | margin: 0 auto !important; |
| 21 | border: 0; |
| 22 | padding: 0; |
| 23 | float: none !important; |
| 24 | overflow: visible; |
| 25 | } |
| 26 | |
| 27 | /* Remove any elements not needed in print. */ |
| 28 | .nestedarrow, |
| 29 | .reveal .controls, |
| 30 | .reveal .progress, |
| 31 | .reveal .playback, |
| 32 | .reveal.overview, |
| 33 | .state-background { |
| 34 | display: none !important; |
| 35 | } |
| 36 | |
| 37 | .reveal pre code { |
| 38 | overflow: hidden !important; |
| 39 | font-family: Courier, 'Courier New', monospace !important; |
| 40 | } |
| 41 | |
| 42 | .reveal { |
| 43 | width: auto !important; |
| 44 | height: auto !important; |
| 45 | overflow: hidden !important; |
| 46 | } |
| 47 | .reveal .slides { |
| 48 | position: static; |
| 49 | width: 100% !important; |
| 50 | height: auto !important; |
| 51 | zoom: 1 !important; |
| 52 | pointer-events: initial; |
| 53 | |
| 54 | left: auto; |
| 55 | top: auto; |
| 56 | margin: 0 !important; |
| 57 | padding: 0 !important; |
| 58 | |
| 59 | overflow: visible; |
| 60 | display: block; |
| 61 | |
| 62 | perspective: none; |
| 63 | perspective-origin: 50% 50%; |
| 64 | } |
| 65 | |
| 66 | .reveal .slides .pdf-page { |
| 67 | position: relative; |
| 68 | overflow: hidden; |
| 69 | z-index: 1; |
| 70 | |
| 71 | page-break-after: always; |
| 72 | } |
| 73 | |
| 74 | .reveal .slides section { |
| 75 | visibility: visible !important; |
| 76 | display: block !important; |
| 77 | position: absolute !important; |
| 78 | |
| 79 | margin: 0 !important; |
| 80 | padding: 0 !important; |
| 81 | box-sizing: border-box !important; |
| 82 | min-height: 1px; |
| 83 | |
| 84 | opacity: 1 !important; |
| 85 | |
| 86 | transform-style: flat !important; |
| 87 | transform: none !important; |
| 88 | } |
| 89 | |
| 90 | .reveal section.stack { |
| 91 | position: relative !important; |
| 92 | margin: 0 !important; |
| 93 | padding: 0 !important; |
| 94 | page-break-after: avoid !important; |
| 95 | height: auto !important; |
| 96 | min-height: auto !important; |
| 97 | } |
| 98 | |
| 99 | .reveal img { |
| 100 | box-shadow: none; |
| 101 | } |
| 102 | |
| 103 | |
| 104 | /* Slide backgrounds are placed inside of their slide when exporting to PDF */ |
| 105 | .reveal .backgrounds { |
| 106 | display: none; |
| 107 | } |
| 108 | .reveal .slide-background { |
| 109 | display: block !important; |
| 110 | position: absolute; |
| 111 | top: 0; |
| 112 | left: 0; |
| 113 | width: 100%; |
| 114 | height: 100%; |
| 115 | z-index: auto !important; |
| 116 | } |
| 117 | |
| 118 | /* Display slide speaker notes when 'showNotes' is enabled */ |
| 119 | .reveal.show-notes { |
| 120 | max-width: none; |
| 121 | max-height: none; |
| 122 | } |
| 123 | .reveal .speaker-notes-pdf { |
| 124 | display: block; |
| 125 | width: 100%; |
| 126 | height: auto; |
| 127 | max-height: none; |
| 128 | top: auto; |
| 129 | right: auto; |
| 130 | bottom: auto; |
| 131 | left: auto; |
| 132 | z-index: 100; |
| 133 | } |
| 134 | |
| 135 | /* Layout option which makes notes appear on a separate page */ |
| 136 | .reveal .speaker-notes-pdf[data-layout="separate-page"] { |
| 137 | position: relative; |
| 138 | color: inherit; |
| 139 | background-color: transparent; |
| 140 | padding: 20px; |
| 141 | page-break-after: always; |
| 142 | border: 0; |
| 143 | } |
| 144 | |
| 145 | /* Display slide numbers when 'slideNumber' is enabled */ |
| 146 | .reveal .slide-number-pdf { |
| 147 | display: block; |
| 148 | position: absolute; |
| 149 | font-size: 14px; |
| 150 | } |
| 151 | |
| 152 | /* This accessibility tool is not useful in PDF and breaks it visually */ |
| 153 | .aria-status { |
| 154 | display: none; |
| 155 | } |
| 156 | } |