blob: 308f202c3d07cef2b627039b3d5d6687645b4e3b [file] [log] [blame]
Christophe Dervieuxe1893ae2021-10-07 17:09:02 +02001/**
2 * This stylesheet is used to print reveal.js
3 * presentations to PDF.
4 *
5 * https://revealjs.com/pdf-export/
6 */
7
8html.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;
Christophe Dervieuxe1893ae2021-10-07 17:09:02 +020039 }
40
41 .reveal {
42 width: auto !important;
43 height: auto !important;
44 overflow: hidden !important;
45 }
46 .reveal .slides {
47 position: static;
48 width: 100% !important;
49 height: auto !important;
50 zoom: 1 !important;
51 pointer-events: initial;
52
53 left: auto;
54 top: auto;
55 margin: 0 !important;
56 padding: 0 !important;
57
58 overflow: visible;
59 display: block;
60
61 perspective: none;
62 perspective-origin: 50% 50%;
63 }
64
65 .reveal .slides .pdf-page {
66 position: relative;
67 overflow: hidden;
68 z-index: 1;
69
70 page-break-after: always;
71 }
72
73 .reveal .slides section {
74 visibility: visible !important;
75 display: block !important;
76 position: absolute !important;
77
78 margin: 0 !important;
79 padding: 0 !important;
80 box-sizing: border-box !important;
81 min-height: 1px;
82
83 opacity: 1 !important;
84
85 transform-style: flat !important;
86 transform: none !important;
87 }
88
89 .reveal section.stack {
90 position: relative !important;
91 margin: 0 !important;
92 padding: 0 !important;
93 page-break-after: avoid !important;
94 height: auto !important;
95 min-height: auto !important;
96 }
97
98 .reveal img {
99 box-shadow: none;
100 }
101
Christophe Dervieuxe1893ae2021-10-07 17:09:02 +0200102 /* Slide backgrounds are placed inside of their slide when exporting to PDF */
103 .reveal .backgrounds {
104 display: none;
105 }
106 .reveal .slide-background {
107 display: block !important;
108 position: absolute;
109 top: 0;
110 left: 0;
111 width: 100%;
112 height: 100%;
113 z-index: auto !important;
114 }
115
116 /* Display slide speaker notes when 'showNotes' is enabled */
117 .reveal.show-notes {
118 max-width: none;
119 max-height: none;
120 }
121 .reveal .speaker-notes-pdf {
122 display: block;
123 width: 100%;
124 height: auto;
125 max-height: none;
126 top: auto;
127 right: auto;
128 bottom: auto;
129 left: auto;
130 z-index: 100;
131 }
132
133 /* Layout option which makes notes appear on a separate page */
134 .reveal .speaker-notes-pdf[data-layout="separate-page"] {
135 position: relative;
136 color: inherit;
137 background-color: transparent;
138 padding: 20px;
139 page-break-after: always;
140 border: 0;
141 }
142
143 /* Display slide numbers when 'slideNumber' is enabled */
144 .reveal .slide-number-pdf {
145 display: block;
146 position: absolute;
147 font-size: 14px;
148 }
149
150 /* This accessibility tool is not useful in PDF and breaks it visually */
151 .aria-status {
152 display: none;
153 }
154}