返回 reveal.js
theme.scss
根目录 / css / theme / template / theme.scss
1 // Base theme template for reveal.js
2
3 /*********************************************
4 * GLOBAL STYLES
5 *********************************************/
6
7 .reveal-viewport {
8 background: var(--r-background);
9 background-color: var(--r-background-color);
10 }
11
12 .reveal {
13 font-family: var(--r-main-font);
14 font-size: var(--r-main-font-size);
15 font-weight: normal;
16 color: var(--r-main-color);
17 }
18
19 .reveal ::selection {
20 color: var(--r-selection-color);
21 background: var(--r-selection-background-color);
22 text-shadow: none;
23 }
24
25 .reveal ::-moz-selection {
26 color: var(--r-selection-color);
27 background: var(--r-selection-background-color);
28 text-shadow: none;
29 }
30
31 .reveal .slides section,
32 .reveal .slides section > section {
33 line-height: 1.3;
34 font-weight: inherit;
35 }
36
37 /*********************************************
38 * HEADERS
39 *********************************************/
40
41 .reveal h1,
42 .reveal h2,
43 .reveal h3,
44 .reveal h4,
45 .reveal h5,
46 .reveal h6 {
47 margin: var(--r-heading-margin);
48 color: var(--r-heading-color);
49
50 font-family: var(--r-heading-font);
51 font-weight: var(--r-heading-font-weight);
52 line-height: var(--r-heading-line-height);
53 letter-spacing: var(--r-heading-letter-spacing);
54
55 text-transform: var(--r-heading-text-transform);
56 text-shadow: var(--r-heading-text-shadow);
57
58 word-wrap: break-word;
59 }
60
61 .reveal h1 {
62 font-size: var(--r-heading1-size);
63 }
64 .reveal h2 {
65 font-size: var(--r-heading2-size);
66 }
67 .reveal h3 {
68 font-size: var(--r-heading3-size);
69 }
70 .reveal h4 {
71 font-size: var(--r-heading4-size);
72 }
73
74 .reveal h1 {
75 text-shadow: var(--r-heading1-text-shadow);
76 }
77
78 /*********************************************
79 * OTHER
80 *********************************************/
81
82 .reveal p {
83 margin: var(--r-block-margin) 0;
84 line-height: 1.3;
85 }
86
87 /* Remove trailing margins after titles */
88 .reveal h1:last-child,
89 .reveal h2:last-child,
90 .reveal h3:last-child,
91 .reveal h4:last-child,
92 .reveal h5:last-child,
93 .reveal h6:last-child {
94 margin-bottom: 0;
95 }
96
97 /* Ensure certain elements are never larger than the slide itself */
98 .reveal img,
99 .reveal video,
100 .reveal iframe {
101 max-width: 95%;
102 max-height: 95%;
103 }
104 .reveal strong,
105 .reveal b {
106 font-weight: bold;
107 }
108
109 .reveal em {
110 font-style: italic;
111 }
112
113 .reveal ol,
114 .reveal dl,
115 .reveal ul {
116 display: inline-block;
117
118 text-align: left;
119 margin: 0 0 0 1em;
120 }
121
122 .reveal ol {
123 list-style-type: decimal;
124 }
125
126 .reveal ul {
127 list-style-type: disc;
128 }
129
130 .reveal ul ul {
131 list-style-type: square;
132 }
133
134 .reveal ul ul ul {
135 list-style-type: circle;
136 }
137
138 .reveal ul ul,
139 .reveal ul ol,
140 .reveal ol ol,
141 .reveal ol ul {
142 display: block;
143 margin-left: 40px;
144 }
145
146 .reveal dt {
147 font-weight: bold;
148 }
149
150 .reveal dd {
151 margin-left: 40px;
152 }
153
154 .reveal blockquote {
155 display: block;
156 position: relative;
157 width: 70%;
158 margin: var(--r-block-margin) auto;
159 padding: 5px;
160
161 font-style: italic;
162 background: rgba(255, 255, 255, 0.05);
163 box-shadow: 0px 0px 2px rgba(0, 0, 0, 0.2);
164 }
165 .reveal blockquote p:first-child,
166 .reveal blockquote p:last-child {
167 display: inline-block;
168 }
169
170 .reveal q {
171 font-style: italic;
172 }
173
174 .reveal pre {
175 display: block;
176 position: relative;
177 width: 90%;
178 margin: var(--r-block-margin) auto;
179
180 text-align: left;
181 font-size: 0.55em;
182 font-family: var(--r-code-font);
183 line-height: 1.2em;
184
185 word-wrap: break-word;
186
187 box-shadow: 0px 5px 15px rgba(0, 0, 0, 0.15);
188 }
189
190 .reveal code {
191 font-family: var(--r-code-font);
192 text-transform: none;
193 tab-size: 2;
194 }
195
196 .reveal pre code {
197 display: block;
198 padding: 5px;
199 overflow: auto;
200 max-height: 400px;
201 word-wrap: normal;
202 }
203
204 .reveal .code-wrapper {
205 white-space: normal;
206 }
207
208 .reveal .code-wrapper code {
209 white-space: pre;
210 }
211
212 .reveal table {
213 margin: auto;
214 border-collapse: collapse;
215 border-spacing: 0;
216 }
217
218 .reveal table th {
219 font-weight: bold;
220 }
221
222 .reveal table th,
223 .reveal table td {
224 text-align: left;
225 padding: 0.2em 0.5em 0.2em 0.5em;
226 border-bottom: 1px solid;
227 }
228
229 .reveal table th[align='center'],
230 .reveal table td[align='center'] {
231 text-align: center;
232 }
233
234 .reveal table th[align='right'],
235 .reveal table td[align='right'] {
236 text-align: right;
237 }
238
239 .reveal table tbody tr:last-child th,
240 .reveal table tbody tr:last-child td {
241 border-bottom: none;
242 }
243
244 .reveal sup {
245 vertical-align: super;
246 font-size: smaller;
247 }
248 .reveal sub {
249 vertical-align: sub;
250 font-size: smaller;
251 }
252
253 .reveal small {
254 display: inline-block;
255 font-size: 0.6em;
256 line-height: 1.2em;
257 vertical-align: top;
258 }
259
260 .reveal small * {
261 vertical-align: top;
262 }
263
264 .reveal img {
265 margin: var(--r-block-margin) 0;
266 }
267
268 /*********************************************
269 * LINKS
270 *********************************************/
271
272 .reveal a {
273 color: var(--r-link-color);
274 text-decoration: none;
275 transition: color 0.15s ease;
276 }
277 .reveal a:hover {
278 color: var(--r-link-color-hover);
279 text-shadow: none;
280 border: none;
281 }
282
283 .reveal .roll span:after {
284 color: #fff;
285 // background: darken( var(--r-link-color), 15% );
286 background: var(--r-link-color-dark);
287 }
288
289 /*********************************************
290 * Frame helper
291 *********************************************/
292
293 .reveal .r-frame {
294 border: 4px solid var(--r-main-color);
295 box-shadow: 0 0 10px rgba(0, 0, 0, 0.15);
296 }
297
298 .reveal a .r-frame {
299 transition: all 0.15s linear;
300 }
301
302 .reveal a:hover .r-frame {
303 border-color: var(--r-link-color);
304 box-shadow: 0 0 20px rgba(0, 0, 0, 0.55);
305 }
306
307 /*********************************************
308 * NAVIGATION CONTROLS
309 *********************************************/
310
311 .reveal .controls {
312 color: var(--r-link-color);
313 }
314
315 /*********************************************
316 * PROGRESS BAR
317 *********************************************/
318
319 .reveal .progress {
320 background: rgba(0, 0, 0, 0.2);
321 color: var(--r-link-color);
322 }
323
324 /*********************************************
325 * PRINT BACKGROUND
326 *********************************************/
327 @media print {
328 .backgrounds {
329 background-color: var(--r-background-color);
330 }
331 }
332
332 lines Plain Text