blob: 0a1c2bf646aaf7b4c8201d7b5639b3ceb89c36ab [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
Marc Kupietz9c036a42024-05-14 13:17:25 +02008html.reveal-print {
Christophe Dervieuxe1893ae2021-10-07 17:09:02 +02009 * {
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
Marc Kupietz9c036a42024-05-14 13:17:25 +020073 .reveal .slides .pdf-page:last-of-type {
74 page-break-after: avoid;
75 }
76
Christophe Dervieuxe1893ae2021-10-07 17:09:02 +020077 .reveal .slides section {
78 visibility: visible !important;
79 display: block !important;
80 position: absolute !important;
81
82 margin: 0 !important;
83 padding: 0 !important;
84 box-sizing: border-box !important;
85 min-height: 1px;
86
87 opacity: 1 !important;
88
89 transform-style: flat !important;
90 transform: none !important;
91 }
92
93 .reveal section.stack {
94 position: relative !important;
95 margin: 0 !important;
96 padding: 0 !important;
97 page-break-after: avoid !important;
98 height: auto !important;
99 min-height: auto !important;
100 }
101
102 .reveal img {
103 box-shadow: none;
104 }
105
Christophe Dervieuxe1893ae2021-10-07 17:09:02 +0200106 /* Slide backgrounds are placed inside of their slide when exporting to PDF */
107 .reveal .backgrounds {
108 display: none;
109 }
110 .reveal .slide-background {
111 display: block !important;
112 position: absolute;
113 top: 0;
114 left: 0;
115 width: 100%;
116 height: 100%;
117 z-index: auto !important;
118 }
119
120 /* Display slide speaker notes when 'showNotes' is enabled */
121 .reveal.show-notes {
122 max-width: none;
123 max-height: none;
124 }
125 .reveal .speaker-notes-pdf {
126 display: block;
127 width: 100%;
128 height: auto;
129 max-height: none;
130 top: auto;
131 right: auto;
132 bottom: auto;
133 left: auto;
134 z-index: 100;
135 }
136
137 /* Layout option which makes notes appear on a separate page */
138 .reveal .speaker-notes-pdf[data-layout="separate-page"] {
139 position: relative;
140 color: inherit;
141 background-color: transparent;
142 padding: 20px;
143 page-break-after: always;
144 border: 0;
145 }
146
147 /* Display slide numbers when 'slideNumber' is enabled */
148 .reveal .slide-number-pdf {
149 display: block;
150 position: absolute;
151 font-size: 14px;
Marc Kupietz9c036a42024-05-14 13:17:25 +0200152 visibility: visible;
Christophe Dervieuxe1893ae2021-10-07 17:09:02 +0200153 }
154
155 /* This accessibility tool is not useful in PDF and breaks it visually */
156 .aria-status {
157 display: none;
158 }
159}