@kadal/theme-crayon 0.0.0-stage → 0.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (5) hide show
  1. package/LICENSE +661 -0
  2. package/README.md +65 -2
  3. package/index.tsx +98 -0
  4. package/package.json +101 -4
  5. package/style.css +856 -0
package/style.css ADDED
@@ -0,0 +1,856 @@
1
+ /* ─────────────────────────────────────────────────────────────────────────────
2
+ Crayon — a playful pastel theme for workshops and classrooms. Fredoka for headings, Nunito for
3
+ text, Fira Code for code; cream paper and plum ink, six pastels, chunky ink outlines and
4
+ offset shadows that look like paper cut-outs stuck to the page. Callouts are stickers, a
5
+ blockquote is a speech bubble, list bullets are coloured dots.
6
+
7
+ The shadows are solid offsets, never blurred, so a printed page and a PDF look the same as the
8
+ screen. Stickers keep their pastel and their ink in the dark scheme: a sticker is a sticker.
9
+ Scoped under .theme-crayon; dark is .theme-crayon[data-color-scheme="dark"].
10
+ themeConfig: `tilt: false` (--theme-tilt: 0) straightens the stickers; colours: `accent`,
11
+ `accentDark` (--theme-accent, --theme-accent-dark).
12
+ ───────────────────────────────────────────────────────────────────────────── */
13
+
14
+ .theme-crayon {
15
+ --crayon-ink: #2b2340;
16
+ --crayon-pink: #ffd3e2;
17
+ --crayon-mint: #c6f1da;
18
+ --crayon-sky: #cfe5ff;
19
+ --crayon-butter: #fff0a8;
20
+ --crayon-lilac: #e6dcff;
21
+ --crayon-peach: #ffd9c2;
22
+ --crayon-tilt: calc(var(--theme-tilt, 1) * 1deg);
23
+ --crayon-outline: 3px solid var(--crayon-ink);
24
+ --crayon-lift: 5px 5px 0 var(--crayon-ink);
25
+ --crayon-card: #ffffff;
26
+ --deck-bg: #fff8ef;
27
+ --deck-fg: #2b2340;
28
+ --deck-muted: #605676;
29
+ --deck-accent: var(--theme-accent, #c62f6b);
30
+ --deck-accent-2: #2f63c9;
31
+ --deck-surface: #ffffff;
32
+ --deck-border: rgba(43, 35, 64, 0.2);
33
+ --deck-live: var(--deck-accent);
34
+ --deck-controls-color: var(--deck-accent);
35
+ --crayon-ground:
36
+ radial-gradient(circle at 100% 0%, rgba(255, 211, 226, 0.6) 0 7%, transparent 7.1%),
37
+ radial-gradient(circle at 0% 100%, rgba(198, 241, 218, 0.6) 0 9%, transparent 9.1%),
38
+ radial-gradient(rgba(43, 35, 64, 0.07) 1.2px, transparent 1.4px) 0 0 / 28px 28px,
39
+ var(--deck-bg);
40
+ --deck-heading-font: "Fredoka", "Baloo 2", ui-rounded, "SF Pro Rounded", system-ui, sans-serif;
41
+ --deck-body-font: "Nunito", ui-rounded, "SF Pro Rounded", system-ui, -apple-system, sans-serif;
42
+ --deck-mono-font: "Fira Code", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
43
+ --deck-serif-font: ui-serif, Georgia, Cambria, "Times New Roman", serif;
44
+ --deck-base-size: 35px;
45
+ --deck-code-bg: #ffffff;
46
+ --deck-code-fg: #4c4f69;
47
+ --deck-code-active: rgba(255, 240, 168, 0.75);
48
+ --deck-radius: 22px;
49
+ --deck-pad: 88px;
50
+ --deck-transition: 520ms;
51
+ }
52
+ .theme-crayon[data-color-scheme="dark"] {
53
+ --crayon-accent-lifted: color-mix(in oklab, var(--theme-accent) 55%, white);
54
+ /* outlines and shadows go a shade darker than the page, so cut-outs still stand off it */
55
+ --crayon-shadow-ink: #0d0a16;
56
+ --crayon-outline: 3px solid #0d0a16;
57
+ --crayon-lift: 5px 5px 0 #0d0a16;
58
+ --crayon-card: #2a2440;
59
+ --deck-bg: #1f1a2e;
60
+ --deck-fg: #f7f1ff;
61
+ --deck-muted: #c2b8dc;
62
+ --deck-accent: var(--theme-accent-dark, var(--crayon-accent-lifted, #ff9cc2));
63
+ --deck-accent-2: #8fc1ff;
64
+ --deck-surface: #2a2440;
65
+ --deck-border: rgba(247, 241, 255, 0.18);
66
+ --deck-live: var(--deck-accent);
67
+ --crayon-ground:
68
+ radial-gradient(circle at 100% 0%, rgba(255, 156, 194, 0.14) 0 7%, transparent 7.1%),
69
+ radial-gradient(circle at 0% 100%, rgba(143, 193, 255, 0.14) 0 9%, transparent 9.1%),
70
+ radial-gradient(rgba(247, 241, 255, 0.07) 1.2px, transparent 1.4px) 0 0 / 28px 28px,
71
+ var(--deck-bg);
72
+ --deck-code-bg: #24273a;
73
+ --deck-code-fg: #cad3f5;
74
+ --deck-code-active: rgba(255, 240, 168, 0.14);
75
+ color-scheme: dark;
76
+ }
77
+
78
+ /* ── the page ──────────────────────────────────────────────────────────── */
79
+ .theme-crayon :is(
80
+ .deck-backgrounds,
81
+ .deck-print-page,
82
+ .deck-overview-tile,
83
+ .deck-scroll-sticky,
84
+ .deck-thumbnail-capture
85
+ ),
86
+ .theme-crayon .deck-background[data-color-scheme],
87
+ .theme-crayon.deck-background[data-color-scheme] {
88
+ background: var(--crayon-ground);
89
+ }
90
+
91
+ /* ── type ──────────────────────────────────────────────────────────────── */
92
+ .theme-crayon .deck-slide {
93
+ line-height: 1.5;
94
+ }
95
+ .theme-crayon .deck-slide :is(h1, h2, h3, h4) {
96
+ font-weight: 600;
97
+ letter-spacing: -0.01em;
98
+ line-height: 1.12;
99
+ }
100
+ .theme-crayon .deck-slide h1 {
101
+ font-size: 3em;
102
+ }
103
+ .theme-crayon .deck-slide h2 {
104
+ font-size: 1.9em;
105
+ margin-bottom: 0.6em;
106
+ text-decoration: underline wavy var(--deck-accent) 0.07em;
107
+ text-underline-offset: 0.26em;
108
+ text-decoration-skip-ink: none;
109
+ }
110
+ .theme-crayon .deck-slide h3 {
111
+ font-size: 1.2em;
112
+ color: var(--deck-accent);
113
+ }
114
+ .theme-crayon .deck-slide h4 {
115
+ display: inline-block;
116
+ width: fit-content;
117
+ padding: 0.25em 0.8em;
118
+ font-size: 0.6em;
119
+ font-weight: 600;
120
+ letter-spacing: 0.06em;
121
+ text-transform: uppercase;
122
+ color: var(--crayon-ink);
123
+ background: var(--crayon-butter);
124
+ border: 2px solid var(--crayon-ink);
125
+ border-radius: 999px;
126
+ transform: rotate(calc(var(--crayon-tilt) * -2));
127
+ }
128
+ .theme-crayon .deck-layout-default > :is(p, ul, ol) {
129
+ max-width: 36em;
130
+ }
131
+ .theme-crayon .deck-slide ul {
132
+ list-style: none;
133
+ padding-inline-start: 1.25em;
134
+ }
135
+ .theme-crayon .deck-slide ul > li {
136
+ position: relative;
137
+ }
138
+ .theme-crayon .deck-slide ul > li::before {
139
+ content: "";
140
+ position: absolute;
141
+ left: -1.15em;
142
+ top: 0.38em;
143
+ width: 0.62em;
144
+ height: 0.62em;
145
+ border-radius: 50%;
146
+ background: var(--crayon-pink);
147
+ border: 2px solid var(--crayon-ink);
148
+ box-sizing: border-box;
149
+ }
150
+ .theme-crayon .deck-slide ul > li:nth-child(4n + 2)::before {
151
+ background: var(--crayon-mint);
152
+ }
153
+ .theme-crayon .deck-slide ul > li:nth-child(4n + 3)::before {
154
+ background: var(--crayon-sky);
155
+ }
156
+ .theme-crayon .deck-slide ul > li:nth-child(4n + 4)::before {
157
+ background: var(--crayon-butter);
158
+ }
159
+ .theme-crayon .deck-slide ul ul > li::before {
160
+ width: 0.45em;
161
+ height: 0.45em;
162
+ top: 0.5em;
163
+ left: -1em;
164
+ background: var(--crayon-lilac);
165
+ }
166
+ .theme-crayon .deck-slide ol > li::marker {
167
+ font-family: var(--deck-heading-font);
168
+ font-weight: 600;
169
+ color: var(--deck-accent);
170
+ }
171
+ .theme-crayon .deck-slide strong {
172
+ font-weight: 800;
173
+ }
174
+ .theme-crayon .deck-slide em {
175
+ font-style: normal;
176
+ background: linear-gradient(transparent 55%, var(--crayon-butter) 55% 92%, transparent 92%);
177
+ color: var(--crayon-ink);
178
+ padding: 0 0.1em;
179
+ }
180
+ .theme-crayon[data-color-scheme="dark"] .deck-slide em {
181
+ background: linear-gradient(transparent 55%, rgba(255, 240, 168, 0.35) 55% 92%, transparent 92%);
182
+ color: inherit;
183
+ }
184
+ .theme-crayon .deck-slide a {
185
+ color: var(--deck-accent-2);
186
+ font-weight: 700;
187
+ text-decoration-thickness: 0.1em;
188
+ text-underline-offset: 0.18em;
189
+ }
190
+ /* a blockquote is a speech bubble */
191
+ .theme-crayon .deck-slide blockquote {
192
+ position: relative;
193
+ margin: 0.6em 0 1em;
194
+ padding: 0.6em 0.9em;
195
+ border: var(--crayon-outline);
196
+ border-radius: var(--deck-radius);
197
+ background: var(--crayon-card);
198
+ color: var(--deck-fg);
199
+ font-weight: 600;
200
+ box-shadow: var(--crayon-lift);
201
+ }
202
+ .theme-crayon .deck-slide blockquote::after {
203
+ content: "";
204
+ position: absolute;
205
+ left: 1.4em;
206
+ bottom: -0.62em;
207
+ width: 0.9em;
208
+ height: 0.9em;
209
+ background: var(--crayon-card);
210
+ border-right: var(--crayon-outline);
211
+ border-bottom: var(--crayon-outline);
212
+ transform: rotate(45deg) skew(10deg, 10deg);
213
+ }
214
+ .theme-crayon .deck-slide blockquote p:last-child {
215
+ margin-bottom: 0;
216
+ }
217
+ .theme-crayon .deck-slide hr {
218
+ border: 0;
219
+ height: 0.5em;
220
+ margin: 0.8em 0;
221
+ background: radial-gradient(circle, var(--deck-accent) 0.12em, transparent 0.14em) 0 50% / 1em 100%
222
+ repeat-x;
223
+ opacity: 0.6;
224
+ }
225
+ .theme-crayon .deck-slide table {
226
+ font-size: 0.74em;
227
+ border: var(--crayon-outline);
228
+ border-radius: 18px;
229
+ border-collapse: separate;
230
+ border-spacing: 0;
231
+ overflow: hidden;
232
+ background: var(--crayon-card);
233
+ box-shadow: var(--crayon-lift);
234
+ }
235
+ .theme-crayon .deck-slide th {
236
+ font-family: var(--deck-heading-font);
237
+ font-size: 0.85em;
238
+ font-weight: 600;
239
+ letter-spacing: 0.02em;
240
+ text-transform: none;
241
+ color: var(--crayon-ink);
242
+ background: var(--crayon-butter);
243
+ border-bottom: var(--crayon-outline);
244
+ }
245
+ .theme-crayon .deck-slide :is(th, td) {
246
+ padding: 0.5em 0.9em;
247
+ }
248
+ .theme-crayon .deck-slide tbody tr:last-child td {
249
+ border-bottom: 0;
250
+ }
251
+ .theme-crayon .deck-slide :not(pre) > code {
252
+ font-size: 0.8em;
253
+ padding: 0.1em 0.4em;
254
+ border-radius: 8px;
255
+ color: var(--crayon-ink);
256
+ background: var(--crayon-lilac);
257
+ border: 2px solid var(--crayon-ink);
258
+ }
259
+ .theme-crayon .deck-kbd {
260
+ color: var(--crayon-ink);
261
+ background: var(--crayon-butter);
262
+ border: 2px solid var(--crayon-ink);
263
+ border-bottom-width: 4px;
264
+ border-radius: 8px;
265
+ }
266
+ .theme-crayon .deck-slide :is(img, video) {
267
+ border-radius: var(--deck-radius);
268
+ }
269
+
270
+ /* ── code ──────────────────────────────────────────────────────────────── */
271
+ .theme-crayon .deck-code-block {
272
+ border: var(--crayon-outline);
273
+ border-radius: var(--deck-radius);
274
+ box-shadow: var(--crayon-lift);
275
+ }
276
+ .theme-crayon .deck-code-title {
277
+ font: 600 0.5em var(--deck-heading-font);
278
+ letter-spacing: 0.02em;
279
+ color: var(--crayon-ink);
280
+ background: var(--crayon-sky);
281
+ border-bottom: var(--crayon-outline);
282
+ padding: 0.6em 1.2em;
283
+ }
284
+ .theme-crayon .deck-code-title-dot {
285
+ width: 0.85em;
286
+ height: 0.85em;
287
+ background: var(--crayon-pink);
288
+ border: 2px solid var(--crayon-ink);
289
+ box-sizing: border-box;
290
+ }
291
+ .theme-crayon pre.deck-code,
292
+ .theme-crayon .shiki-magic-move-wrap {
293
+ font-size: 0.58em;
294
+ line-height: 1.7;
295
+ }
296
+ .theme-crayon pre.deck-code .line.is-active {
297
+ box-shadow: inset 0.3em 0 0 var(--deck-accent);
298
+ }
299
+ .theme-crayon pre.deck-code .line.is-dim {
300
+ opacity: 0.35;
301
+ }
302
+
303
+ /* ── components: stickers ──────────────────────────────────────────────── */
304
+ .theme-crayon .deck-callout {
305
+ position: relative;
306
+ padding: 0.7em 1em;
307
+ border: var(--crayon-outline);
308
+ border-radius: var(--deck-radius);
309
+ background: var(--crayon-sticker, var(--crayon-sky));
310
+ color: var(--crayon-ink);
311
+ box-shadow: var(--crayon-lift);
312
+ font-size: 0.82em;
313
+ font-weight: 600;
314
+ transform: rotate(calc(var(--crayon-tilt) * -0.8));
315
+ }
316
+ .theme-crayon .deck-callout.kind-tip {
317
+ --crayon-sticker: var(--crayon-mint);
318
+ transform: rotate(calc(var(--crayon-tilt) * 0.9));
319
+ }
320
+ .theme-crayon .deck-callout.kind-warn {
321
+ --crayon-sticker: var(--crayon-butter);
322
+ transform: rotate(calc(var(--crayon-tilt) * -0.5));
323
+ }
324
+ .theme-crayon .deck-callout.kind-danger {
325
+ --crayon-sticker: var(--crayon-pink);
326
+ transform: rotate(calc(var(--crayon-tilt) * 1.1));
327
+ }
328
+ .theme-crayon .deck-callout.kind-note {
329
+ --crayon-sticker: var(--crayon-lilac);
330
+ }
331
+ .theme-crayon .deck-callout-title {
332
+ font-family: var(--deck-heading-font);
333
+ font-size: 1.05em;
334
+ font-weight: 600;
335
+ margin-bottom: 0.2em;
336
+ }
337
+ .theme-crayon .deck-callout :is(a, code) {
338
+ color: var(--crayon-ink);
339
+ }
340
+ .theme-crayon .deck-callout > div > :last-child {
341
+ margin-bottom: 0;
342
+ }
343
+ .theme-crayon .deck-badge {
344
+ font-family: var(--deck-heading-font);
345
+ font-weight: 600;
346
+ letter-spacing: 0.04em;
347
+ color: var(--crayon-ink);
348
+ background: var(--crayon-sky);
349
+ border: 2px solid var(--crayon-ink);
350
+ }
351
+ .theme-crayon .deck-badge.tone-accent {
352
+ color: var(--crayon-ink);
353
+ background: var(--crayon-pink);
354
+ border-color: var(--crayon-ink);
355
+ }
356
+ .theme-crayon .deck-badge.tone-good {
357
+ color: var(--crayon-ink);
358
+ background: var(--crayon-mint);
359
+ border-color: var(--crayon-ink);
360
+ }
361
+ .theme-crayon .deck-badge.tone-warn {
362
+ color: var(--crayon-ink);
363
+ background: var(--crayon-butter);
364
+ border-color: var(--crayon-ink);
365
+ }
366
+ .theme-crayon .deck-badge.tone-bad {
367
+ color: var(--crayon-ink);
368
+ background: var(--crayon-peach);
369
+ border-color: var(--crayon-ink);
370
+ }
371
+ .theme-crayon .deck-toc li {
372
+ margin: 0.25em 0;
373
+ }
374
+ .theme-crayon .deck-toc li.level-1 > a {
375
+ display: inline-block;
376
+ padding: 0.1em 0.7em;
377
+ border: 2px solid transparent;
378
+ border-radius: 999px;
379
+ font-weight: 700;
380
+ }
381
+ .theme-crayon .deck-toc li.is-current > a {
382
+ color: var(--crayon-ink);
383
+ background: var(--crayon-butter);
384
+ border-color: var(--crayon-ink);
385
+ }
386
+ .theme-crayon .deck-toc li:is(.level-2, .level-3) {
387
+ padding-inline-start: 1.6em;
388
+ }
389
+ .theme-crayon .deck-mark {
390
+ --mark-color: var(--deck-accent);
391
+ }
392
+
393
+ /* ── chrome ────────────────────────────────────────────────────────────── */
394
+ .theme-crayon .deck-progress {
395
+ height: 7px;
396
+ background: transparent;
397
+ }
398
+ .theme-crayon .deck-progress span {
399
+ background: repeating-linear-gradient(
400
+ 90deg,
401
+ #ff8fb5 0 24px,
402
+ #7fd6a6 24px 48px,
403
+ #7fb6ff 48px 72px,
404
+ #ffd84d 72px 96px
405
+ );
406
+ border-radius: 0 999px 999px 0;
407
+ }
408
+ .theme-crayon .deck-slide-number {
409
+ font: 700 14px var(--deck-heading-font);
410
+ color: var(--crayon-ink);
411
+ background: var(--crayon-butter);
412
+ border: 2px solid var(--crayon-ink);
413
+ border-radius: 999px;
414
+ }
415
+
416
+ /* ── layouts ───────────────────────────────────────────────────────────── */
417
+ .theme-crayon .deck-layout-cover {
418
+ justify-content: center;
419
+ align-items: flex-start;
420
+ }
421
+ .theme-crayon .deck-layout-cover h1 {
422
+ font-size: 4.2em;
423
+ max-width: 12ch;
424
+ margin-bottom: 0.3em;
425
+ }
426
+ .theme-crayon .deck-layout-cover > p {
427
+ max-width: 28em;
428
+ font-size: 1.1em;
429
+ font-weight: 600;
430
+ color: var(--deck-muted);
431
+ }
432
+ /* the cover's cut-outs, a sun and a blob: on the slide rather than the layout, so the auto-fit
433
+ never counts them as the layout's overflow */
434
+ .theme-crayon .deck-slide.layout-cover::before {
435
+ content: "";
436
+ position: absolute;
437
+ top: calc(var(--deck-pad) * 0.6);
438
+ right: calc(var(--deck-pad) * 1.4);
439
+ width: 4.6em;
440
+ height: 4.6em;
441
+ border-radius: 50%;
442
+ background: var(--crayon-butter);
443
+ border: var(--crayon-outline);
444
+ box-shadow: var(--crayon-lift);
445
+ }
446
+ .theme-crayon .deck-slide.layout-cover::after {
447
+ content: "";
448
+ position: absolute;
449
+ right: calc(var(--deck-pad) + 3.6em);
450
+ bottom: calc(var(--deck-pad) * 1.1);
451
+ width: 6.4em;
452
+ height: 3.4em;
453
+ border-radius: 58% 42% 55% 45% / 60% 50% 50% 40%;
454
+ background: var(--crayon-mint);
455
+ border: var(--crayon-outline);
456
+ box-shadow: var(--crayon-lift);
457
+ transform: rotate(calc(var(--crayon-tilt) * -8));
458
+ }
459
+ .theme-crayon .deck-layout-intro {
460
+ align-items: flex-start;
461
+ }
462
+ .theme-crayon .deck-layout-intro h1 {
463
+ font-size: 3em;
464
+ }
465
+ .theme-crayon .deck-layout-intro > p {
466
+ max-width: 32em;
467
+ color: var(--deck-muted);
468
+ }
469
+ /* a section title is a big sticker */
470
+ .theme-crayon .deck-layout-section {
471
+ align-items: flex-start;
472
+ }
473
+ .theme-crayon .deck-layout-section :is(h1, h2) {
474
+ font-size: 3.2em;
475
+ max-width: 15ch;
476
+ padding: 0.25em 0.55em 0.3em;
477
+ color: var(--crayon-ink);
478
+ background: var(--crayon-pink);
479
+ border: 4px solid var(--crayon-ink);
480
+ border-radius: 28px;
481
+ box-shadow: 8px 8px 0 var(--crayon-shadow-ink, var(--crayon-ink));
482
+ transform: rotate(calc(var(--crayon-tilt) * -1.5));
483
+ text-decoration: none;
484
+ }
485
+ .theme-crayon .deck-layout-section > p {
486
+ margin-top: 0.6em;
487
+ max-width: 30em;
488
+ font-weight: 600;
489
+ color: var(--deck-muted);
490
+ }
491
+ .theme-crayon .deck-layout-end :is(h1, h2) {
492
+ font-size: 3.6em;
493
+ }
494
+ .theme-crayon .deck-layout-end > p {
495
+ font-weight: 600;
496
+ color: var(--deck-muted);
497
+ }
498
+ .theme-crayon .deck-layout-end::before {
499
+ content: "";
500
+ width: 2.6em;
501
+ height: 2.6em;
502
+ margin-bottom: 0.4em;
503
+ border-radius: 50%;
504
+ border: var(--crayon-outline);
505
+ box-shadow: var(--crayon-lift);
506
+ background:
507
+ radial-gradient(circle at 35% 40%, var(--crayon-ink) 0 0.16em, transparent 0.17em),
508
+ radial-gradient(circle at 65% 40%, var(--crayon-ink) 0 0.16em, transparent 0.17em),
509
+ radial-gradient(ellipse 0.7em 0.45em at 50% 62%, var(--crayon-ink) 0 98%, transparent 100%),
510
+ var(--crayon-butter);
511
+ }
512
+ /* a fact is a number in a round sticker */
513
+ .theme-crayon .deck-layout-fact > :is(h1, h2, p, .deck-counter):first-child {
514
+ display: grid;
515
+ place-items: center;
516
+ width: 3.4em;
517
+ height: 3.4em;
518
+ margin-bottom: 0.25em;
519
+ border-radius: 50%;
520
+ font-family: var(--deck-heading-font);
521
+ font-size: 2.2em;
522
+ font-weight: 600;
523
+ letter-spacing: -0.02em;
524
+ color: var(--crayon-ink);
525
+ background: var(--crayon-mint);
526
+ border: 4px solid var(--crayon-ink);
527
+ box-shadow: 8px 8px 0 var(--crayon-shadow-ink, var(--crayon-ink));
528
+ transform: rotate(calc(var(--crayon-tilt) * 4));
529
+ }
530
+ .theme-crayon .deck-layout-fact > :not(:first-child) {
531
+ font-size: 1em;
532
+ font-weight: 600;
533
+ letter-spacing: 0;
534
+ color: var(--deck-muted);
535
+ max-width: 26em;
536
+ }
537
+ .theme-crayon .deck-layout-quote {
538
+ padding-inline: 10%;
539
+ font-style: normal;
540
+ font-size: 1.2em;
541
+ }
542
+ .theme-crayon .deck-layout-quote blockquote {
543
+ font-size: 1.05em;
544
+ padding: 0.8em 1.1em;
545
+ }
546
+ .theme-crayon .deck-layout-quote > p {
547
+ margin-top: 0.3em;
548
+ padding-inline-start: 1.2em;
549
+ font-size: 0.7em;
550
+ font-weight: 700;
551
+ color: var(--deck-muted);
552
+ }
553
+ .theme-crayon .deck-layout-statement :is(h1, h2) {
554
+ font-size: 3em;
555
+ max-width: 18ch;
556
+ margin-inline: auto;
557
+ text-decoration: none;
558
+ }
559
+ .theme-crayon .deck-layout-full {
560
+ padding: 0;
561
+ }
562
+ .theme-crayon .deck-layout-two-cols {
563
+ column-gap: 2.2em;
564
+ }
565
+ .theme-crayon .deck-layout-two-cols > :is(.deck-slot-default, .deck-slot-right) > :first-child {
566
+ margin-top: 0;
567
+ }
568
+ .theme-crayon .deck-layout-two-cols-header {
569
+ column-gap: 1.4em;
570
+ row-gap: 0.8em;
571
+ }
572
+ .theme-crayon .deck-layout-two-cols-header > :is(.deck-slot-left, .deck-slot-right) {
573
+ padding: 0.7em 1em;
574
+ border: var(--crayon-outline);
575
+ border-radius: var(--deck-radius);
576
+ color: var(--crayon-ink);
577
+ background: var(--crayon-peach);
578
+ box-shadow: var(--crayon-lift);
579
+ transform: rotate(calc(var(--crayon-tilt) * -0.7));
580
+ }
581
+ .theme-crayon .deck-layout-two-cols-header > .deck-slot-right {
582
+ background: var(--crayon-sky);
583
+ transform: rotate(calc(var(--crayon-tilt) * 0.7));
584
+ }
585
+ .theme-crayon .deck-layout-two-cols-header > :is(.deck-slot-left, .deck-slot-right) :is(h3, code) {
586
+ color: var(--crayon-ink);
587
+ }
588
+ .theme-crayon .deck-layout-two-cols-header > :is(.deck-slot-left, .deck-slot-right) > :last-child {
589
+ margin-bottom: 0;
590
+ }
591
+ .theme-crayon .deck-layout-image .deck-layout-image-content {
592
+ background: linear-gradient(180deg, transparent, rgba(31, 26, 46, 0.78));
593
+ }
594
+ .theme-crayon .deck-layout-image .deck-layout-image-content h2 {
595
+ text-decoration-color: var(--crayon-butter);
596
+ }
597
+ .theme-crayon :is(.deck-layout-image-left, .deck-layout-image-right) .deck-layout-image-content {
598
+ padding: calc(var(--deck-pad) * 0.9);
599
+ }
600
+ .theme-crayon .deck-layout-image-left .deck-layout-image-pane,
601
+ .theme-crayon .deck-layout-image-right .deck-layout-image-pane {
602
+ margin: calc(var(--deck-pad) * 0.5);
603
+ border: 4px solid var(--crayon-ink);
604
+ border-radius: 28px;
605
+ box-shadow: 8px 8px 0 var(--crayon-shadow-ink, var(--crayon-ink));
606
+ min-height: 0;
607
+ }
608
+ .theme-crayon .deck-layout-image-pane {
609
+ background-color: var(--crayon-sky);
610
+ }
611
+ .theme-crayon :is(.deck-layout-iframe, .deck-layout-iframe-left, .deck-layout-iframe-right) .deck-frame.deck-layout-iframe-pane {
612
+ border: 4px solid var(--crayon-ink);
613
+ border-radius: 24px;
614
+ box-shadow: 8px 8px 0 var(--crayon-shadow-ink, var(--crayon-ink));
615
+ }
616
+ .theme-crayon :is(.deck-layout-iframe-left, .deck-layout-iframe-right) .deck-layout-iframe-content {
617
+ padding-inline: calc(var(--deck-pad) * 0.4);
618
+ }
619
+
620
+ /* ── the theme's own layouts and components (index.tsx) ───────────────── */
621
+ /* activity: a label, a time, and the steps as numbered stickers */
622
+ .theme-crayon .deck-layout-activity {
623
+ justify-content: flex-start;
624
+ }
625
+ .theme-crayon .crayon-activity-head {
626
+ display: flex;
627
+ align-items: center;
628
+ gap: 0.6em;
629
+ margin-bottom: 0.5em;
630
+ }
631
+ .theme-crayon .crayon-activity-tag,
632
+ .theme-crayon .crayon-activity-time {
633
+ display: inline-flex;
634
+ align-items: center;
635
+ gap: 0.35em;
636
+ padding: 0.2em 0.75em;
637
+ font: 600 0.62em var(--deck-heading-font);
638
+ color: var(--crayon-ink);
639
+ border: 2px solid var(--crayon-ink);
640
+ border-radius: 999px;
641
+ box-shadow: 3px 3px 0 var(--crayon-shadow-ink, var(--crayon-ink));
642
+ }
643
+ .theme-crayon .crayon-activity-tag {
644
+ background: var(--crayon-pink);
645
+ transform: rotate(calc(var(--crayon-tilt) * -2));
646
+ }
647
+ .theme-crayon .crayon-activity-time {
648
+ background: var(--crayon-butter);
649
+ }
650
+ .theme-crayon .deck-layout-activity ol {
651
+ display: grid;
652
+ grid-template-columns: repeat(var(--crayon-steps, 3), minmax(0, 1fr));
653
+ gap: 1em;
654
+ list-style: none;
655
+ padding: 0;
656
+ margin: 0.3em 0 0;
657
+ counter-reset: crayon-step;
658
+ }
659
+ .theme-crayon .deck-layout-activity ol > li {
660
+ counter-increment: crayon-step;
661
+ position: relative;
662
+ margin: 0;
663
+ padding: 1.5em 0.9em 0.8em;
664
+ border: var(--crayon-outline);
665
+ border-radius: var(--deck-radius);
666
+ color: var(--crayon-ink);
667
+ background: var(--crayon-mint);
668
+ box-shadow: var(--crayon-lift);
669
+ font-size: 0.82em;
670
+ font-weight: 600;
671
+ line-height: 1.35;
672
+ }
673
+ .theme-crayon .deck-layout-activity ol > li:nth-child(3n + 2) {
674
+ background: var(--crayon-sky);
675
+ transform: rotate(calc(var(--crayon-tilt) * 1));
676
+ }
677
+ .theme-crayon .deck-layout-activity ol > li:nth-child(3n + 3) {
678
+ background: var(--crayon-lilac);
679
+ transform: rotate(calc(var(--crayon-tilt) * -1));
680
+ }
681
+ .theme-crayon .deck-layout-activity ol > li::before {
682
+ content: counter(crayon-step);
683
+ position: absolute;
684
+ top: -0.75em;
685
+ left: 0.7em;
686
+ display: grid;
687
+ place-items: center;
688
+ width: 1.7em;
689
+ height: 1.7em;
690
+ border-radius: 50%;
691
+ font: 600 1em var(--deck-heading-font);
692
+ color: var(--crayon-ink);
693
+ background: var(--crayon-butter);
694
+ border: var(--crayon-outline);
695
+ }
696
+ .theme-crayon .deck-layout-activity ol > li strong {
697
+ display: block;
698
+ font-family: var(--deck-heading-font);
699
+ font-size: 1.15em;
700
+ font-weight: 600;
701
+ }
702
+ .theme-crayon .deck-layout-activity ol > li :is(code, a) {
703
+ color: var(--crayon-ink);
704
+ }
705
+ /* cards: the slide's list as a grid of pastel cards */
706
+ .theme-crayon .deck-layout-cards ul {
707
+ display: grid;
708
+ grid-template-columns: repeat(var(--crayon-cols, 3), minmax(0, 1fr));
709
+ gap: 1em 1.1em;
710
+ list-style: none;
711
+ padding: 0;
712
+ margin: 0.3em 0 0;
713
+ }
714
+ .theme-crayon .deck-layout-cards ul > li {
715
+ margin: 0;
716
+ padding: 0.7em 0.9em;
717
+ border: var(--crayon-outline);
718
+ border-radius: var(--deck-radius);
719
+ color: var(--crayon-ink);
720
+ background: var(--crayon-peach);
721
+ box-shadow: var(--crayon-lift);
722
+ font-size: 0.82em;
723
+ font-weight: 600;
724
+ }
725
+ .theme-crayon .deck-layout-cards ul > li::before {
726
+ display: none;
727
+ }
728
+ .theme-crayon .deck-layout-cards ul > li:nth-child(6n + 2) {
729
+ background: var(--crayon-mint);
730
+ }
731
+ .theme-crayon .deck-layout-cards ul > li:nth-child(6n + 3) {
732
+ background: var(--crayon-sky);
733
+ }
734
+ .theme-crayon .deck-layout-cards ul > li:nth-child(6n + 4) {
735
+ background: var(--crayon-butter);
736
+ }
737
+ .theme-crayon .deck-layout-cards ul > li:nth-child(6n + 5) {
738
+ background: var(--crayon-lilac);
739
+ }
740
+ .theme-crayon .deck-layout-cards ul > li:nth-child(6n + 6) {
741
+ background: var(--crayon-pink);
742
+ }
743
+ .theme-crayon .deck-layout-cards ul > li:nth-child(odd) {
744
+ transform: rotate(calc(var(--crayon-tilt) * -0.8));
745
+ }
746
+ .theme-crayon .deck-layout-cards ul > li:nth-child(even) {
747
+ transform: rotate(calc(var(--crayon-tilt) * 0.8));
748
+ }
749
+ .theme-crayon .deck-layout-cards ul > li strong {
750
+ display: block;
751
+ font-family: var(--deck-heading-font);
752
+ font-size: 1.15em;
753
+ font-weight: 600;
754
+ }
755
+ .theme-crayon .deck-layout-cards ul > li :is(code, a) {
756
+ color: var(--crayon-ink);
757
+ }
758
+ /* Sticker: any words on a pastel cut-out */
759
+ .theme-crayon .crayon-sticker {
760
+ display: inline-block;
761
+ /* a sticker on a line of its own (MDX makes it a block) keeps its own width */
762
+ align-self: flex-start;
763
+ width: fit-content;
764
+ margin: 0 0.4em 0.5em 0;
765
+ padding: 0.35em 0.8em;
766
+ border: var(--crayon-outline);
767
+ border-radius: 16px;
768
+ color: var(--crayon-ink);
769
+ background: var(--crayon-butter);
770
+ box-shadow: 4px 4px 0 var(--crayon-shadow-ink, var(--crayon-ink));
771
+ font-weight: 700;
772
+ transform: rotate(calc(var(--crayon-tilt) * var(--crayon-turn, -2)));
773
+ }
774
+ .theme-crayon .crayon-sticker.tone-pink {
775
+ background: var(--crayon-pink);
776
+ }
777
+ .theme-crayon .crayon-sticker.tone-mint {
778
+ background: var(--crayon-mint);
779
+ }
780
+ .theme-crayon .crayon-sticker.tone-sky {
781
+ background: var(--crayon-sky);
782
+ }
783
+ .theme-crayon .crayon-sticker.tone-lilac {
784
+ background: var(--crayon-lilac);
785
+ }
786
+ .theme-crayon .crayon-sticker.tone-peach {
787
+ background: var(--crayon-peach);
788
+ }
789
+ .theme-crayon .crayon-sticker > :last-child {
790
+ margin-bottom: 0;
791
+ }
792
+ /* Bubble: a speech bubble with a name */
793
+ .theme-crayon .crayon-bubble {
794
+ position: relative;
795
+ margin: 0.4em 0 1.4em;
796
+ padding: 0.6em 0.95em;
797
+ max-width: 24em;
798
+ border: var(--crayon-outline);
799
+ border-radius: var(--deck-radius);
800
+ background: var(--crayon-card);
801
+ box-shadow: var(--crayon-lift);
802
+ font-weight: 600;
803
+ }
804
+ .theme-crayon .crayon-bubble.is-right {
805
+ margin-inline-start: auto;
806
+ background: var(--crayon-sky);
807
+ color: var(--crayon-ink);
808
+ }
809
+ .theme-crayon .crayon-bubble::after {
810
+ content: "";
811
+ position: absolute;
812
+ left: 1.3em;
813
+ bottom: -0.62em;
814
+ width: 0.9em;
815
+ height: 0.9em;
816
+ background: inherit;
817
+ border-right: var(--crayon-outline);
818
+ border-bottom: var(--crayon-outline);
819
+ transform: rotate(45deg) skew(10deg, 10deg);
820
+ }
821
+ .theme-crayon .crayon-bubble.is-right::after {
822
+ left: auto;
823
+ right: 1.3em;
824
+ }
825
+ .theme-crayon .crayon-bubble-from {
826
+ position: absolute;
827
+ bottom: -1.75em;
828
+ left: 4.4em;
829
+ font: 600 0.6em var(--deck-heading-font);
830
+ color: var(--deck-muted);
831
+ }
832
+ .theme-crayon .crayon-bubble.is-right .crayon-bubble-from {
833
+ left: auto;
834
+ right: 4.4em;
835
+ }
836
+ .theme-crayon .crayon-bubble > :not(.crayon-bubble-from):last-child,
837
+ .theme-crayon .crayon-bubble > p:last-of-type {
838
+ margin-bottom: 0;
839
+ }
840
+
841
+ /* ── narrow screens and stillness ──────────────────────────────────────── */
842
+ @media (max-width: 640px) {
843
+ .theme-crayon .deck-slide.is-scroll :is(.deck-layout-activity ol, .deck-layout-cards ul) {
844
+ grid-template-columns: 1fr;
845
+ }
846
+ }
847
+ @media (prefers-reduced-motion: reduce) {
848
+ .theme-crayon .deck-progress span {
849
+ transition: none;
850
+ }
851
+ }
852
+
853
+ /* centred: the built-in placement, in this theme's rhythm */
854
+ .theme-crayon .deck-layout-center > :is(h1, h2) {
855
+ margin-bottom: 0.3em;
856
+ }