Skip to content

Commit 447fefd

Browse files
committed
scope print styles to .reveal #3348
1 parent 6510916 commit 447fefd

File tree

2 files changed

+28
-40
lines changed

2 files changed

+28
-40
lines changed

css/print/paper.scss

+27-39
Original file line numberDiff line numberDiff line change
@@ -1,42 +1,30 @@
1-
/* Default Print Stylesheet Template
2-
by Rob Glazebrook of CSSnewbie.com
3-
Last Updated: June 4, 2008
4-
5-
Feel free (nay, compelled) to edit, append, and
6-
manipulate this file as you see fit. */
71

82
@media print {
93
html:not(.print-pdf) {
10-
11-
background: #fff;
4+
overflow: visible;
125
width: auto;
136
height: auto;
14-
overflow: visible;
157

168
body {
17-
background: #fff;
18-
font-size: 20pt;
19-
width: auto;
20-
height: auto;
21-
border: 0;
22-
margin: 0 5%;
9+
margin: 0;
2310
padding: 0;
2411
overflow: visible;
25-
float: none !important;
2612
}
13+
}
14+
15+
html:not(.print-pdf) .reveal {
16+
background: #fff;
17+
font-size: 20pt;
2718

28-
.nestedarrow,
2919
.controls,
30-
.fork-reveal,
31-
.share-reveal,
3220
.state-background,
33-
.reveal .progress,
34-
.reveal .backgrounds,
35-
.reveal .slide-number {
21+
.progress,
22+
.backgrounds,
23+
.slide-number {
3624
display: none !important;
3725
}
3826

39-
body, p, td, li {
27+
p, td, li {
4028
font-size: 20pt!important;
4129
color: #000;
4230
}
@@ -49,7 +37,6 @@
4937
letter-spacing: normal;
5038
}
5139

52-
/* Need to reduce the size of the fonts for printing */
5340
h1 { font-size: 28pt !important; }
5441
h2 { font-size: 24pt !important; }
5542
h3 { font-size: 22pt !important; }
@@ -74,18 +61,19 @@
7461
margin: 0;
7562
text-align: left !important;
7663
}
77-
.reveal pre,
78-
.reveal table {
64+
pre,
65+
table {
7966
margin-left: 0;
8067
margin-right: 0;
8168
}
82-
.reveal pre code {
69+
pre code {
8370
padding: 20px;
8471
}
85-
.reveal blockquote {
72+
blockquote {
8673
margin: 20px 0;
8774
}
88-
.reveal .slides {
75+
76+
.slides {
8977
position: static !important;
9078
width: auto !important;
9179
height: auto !important;
@@ -106,7 +94,7 @@
10694

10795
perspective-origin: 50% 50%;
10896
}
109-
.reveal .slides section {
97+
.slides section {
11098
visibility: visible !important;
11199
position: static !important;
112100
width: auto !important;
@@ -129,48 +117,48 @@
129117
transform: none !important;
130118
transition: none !important;
131119
}
132-
.reveal .slides section.stack {
120+
.slides section.stack {
133121
padding: 0 !important;
134122
}
135-
.reveal section:last-of-type {
123+
.slides section:last-of-type {
136124
page-break-after: avoid !important;
137125
}
138-
.reveal section .fragment {
126+
.slides section .fragment {
139127
opacity: 1 !important;
140128
visibility: visible !important;
141129

142130
transform: none !important;
143131
}
144132

145-
.reveal .r-fit-text {
133+
.r-fit-text {
146134
white-space: normal !important;
147135
}
148136

149-
.reveal section img {
137+
section img {
150138
display: block;
151139
margin: 15px 0px;
152140
background: rgba(255,255,255,1);
153141
border: 1px solid #666;
154142
box-shadow: none;
155143
}
156144

157-
.reveal section small {
145+
section small {
158146
font-size: 0.8em;
159147
}
160148

161-
.reveal .hljs {
149+
.hljs {
162150
max-height: 100%;
163151
white-space: pre-wrap;
164152
word-wrap: break-word;
165153
word-break: break-word;
166154
font-size: 15pt;
167155
}
168156

169-
.reveal .hljs .hljs-ln-numbers {
157+
.hljs .hljs-ln-numbers {
170158
white-space: nowrap;
171159
}
172160

173-
.reveal .hljs td {
161+
.hljs td {
174162
font-size: inherit !important;
175163
color: inherit !important;
176164
}

0 commit comments

Comments
 (0)