oficina / slides Public

Clone
git clone https://amadan.net/oficina/slides

Plain git — no account needed to clone.

Download

Download this file

1/* presenter.css — the presenter window (templates/presenter.html) and
2 its scriptless picker (templates/presenter_pick.html).
3
4 Copied from Paul's mockup (docs/superpowers/specs/2026-11-17-
5 presenter-mockup.html): the HalfStack deck's presenter view, its
6 palette and its proportions, with the mockup's ids as presenter-*
7 attributes. Dimmed text uses the mockup's muted grey rather than its
8 faint one wherever it is words, so it keeps 4.5:1 on the background.
9
10 The window never scrolls (spec §5.1): html and body are exactly the
11 viewport and hide what would overflow, every track of every grid is
12 allowed to shrink to nothing, and only the notes (and the picker's
13 list) scroll, inside themselves. Below 720px wide or 560px tall the
14 panels stack in a fixed order; at or above it they sit on the 12×12
15 grid, where the page's own <style> places them (the cookie's
16 arrangement, presenter_window.go). */
17
18:root {
19 color-scheme: dark;
20 --p-bg: #0b0b0f;
21 --p-ink: #efefec;
22 --p-ink-2: #c4c4cc;
23 --p-muted: #9a9aa6;
24 --p-faint: #6c6c78;
25 --p-accent: #ffb454;
26 --p-panel: #111118;
27 --p-raised: #181820;
28 --p-border: #26262f;
29 --p-paper: #faf6ee;
30 --p-mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;
31 --p-sans: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
32 --p-ease: cubic-bezier(0.16, 1, 0.3, 1);
33}
34
35/* No gutter kept for a scrollbar the window never has (tokens.css
36 reserves one on every other page). */
37html {
38 scrollbar-gutter: auto;
39}
40
41html,
42body {
43 margin: 0;
44 block-size: 100%;
45 inline-size: 100%;
46 overflow: hidden;
47}
48
49body {
50 background: var(--p-bg);
51 color: var(--p-ink);
52 font: 16px/1.5 var(--p-sans);
53 -webkit-font-smoothing: antialiased;
54}
55
56[estilo-shell] {
57 block-size: 100%;
58}
59
60[presenter],
61[presenter-pick] {
62 box-sizing: border-box;
63 block-size: 100dvh;
64 inline-size: 100%;
65 overflow: hidden;
66 padding: var(--rst-sp-4) var(--rst-sp-5);
67 background: var(--p-bg);
68 color: var(--p-ink);
69 font-family: var(--p-sans);
70 scrollbar-width: thin;
71 scrollbar-color: #3a3a46 transparent;
72}
73
74[presenter] *,
75[presenter-pick] * {
76 box-sizing: border-box;
77}
78
79[presenter] ::selection {
80 background: rgb(255 180 84 / 0.3);
81 color: var(--p-ink);
82}
83
84:where([presenter], [presenter-pick]) button {
85 font: inherit;
86 color: inherit;
87 cursor: pointer;
88 background: none;
89 border: 0;
90 margin: 0;
91 padding: 0;
92}
93
94:where([presenter], [presenter-pick]) form {
95 margin: 0;
96 display: contents;
97}
98
99:where([presenter], [presenter-pick]) a {
100 color: inherit;
101 text-decoration: none;
102}
103
104[presenter] :focus-visible,
105[presenter-pick] :focus-visible {
106 outline: 2px solid var(--p-accent);
107 outline-offset: 2px;
108}
109
110[presenter] svg.icon {
111 inline-size: 20px;
112 block-size: 20px;
113 flex: none;
114 stroke-width: 1.75;
115}
116
117/* The window: the header, the arranging bar while it shows, then what
118 is left for the panels. */
119[presenter] {
120 display: grid;
121 grid-template-columns: minmax(0, 1fr);
122 grid-template-rows: auto auto minmax(0, 1fr);
123}
124
125[presenter-head] {
126 grid-row: 1;
127}
128
129[presenter-panels],
130[presenter-empty] {
131 grid-row: 3;
132}
133
134/* ---- the header ---- */
135[presenter-head] {
136 position: relative;
137 display: flex;
138 flex-wrap: wrap;
139 align-items: center;
140 gap: var(--rst-sp-2) var(--rst-sp-4);
141 min-inline-size: 0;
142 margin-block-end: var(--rst-sp-4);
143 padding-block-end: var(--rst-sp-3);
144 border-block-end: 1px solid var(--p-border);
145 font-family: var(--p-mono);
146 font-variant-numeric: tabular-nums;
147}
148
149[presenter-pos] {
150 display: inline-flex;
151 align-items: center;
152 gap: var(--rst-sp-2);
153 padding: var(--rst-sp-2) var(--rst-sp-3);
154 border-radius: 8px;
155 font-size: 24px;
156 line-height: 1.2;
157 color: var(--p-ink);
158 white-space: nowrap;
159 transition: background-color 0.2s var(--p-ease);
160}
161
162[presenter-pos]:hover {
163 background: var(--p-raised);
164}
165
166[presenter-pos] svg.icon {
167 color: var(--p-faint);
168}
169
170[presenter-stepcount] {
171 display: inline-flex;
172 align-items: center;
173 gap: var(--rst-sp-2);
174 padding: var(--rst-sp-2) var(--rst-sp-3);
175 border-radius: 8px;
176 background: var(--p-raised);
177}
178
179[presenter-track] {
180 display: flex;
181 gap: var(--rst-sp-1);
182 inline-size: 96px;
183}
184
185[presenter-track] i {
186 flex: 1;
187 block-size: 6px;
188 border-radius: 3px;
189 background: #2c2c36;
190}
191
192[presenter-track] i[data-done] {
193 background: var(--p-accent);
194}
195
196[presenter-steptext] {
197 font: 18px/1.3 var(--p-mono);
198 color: var(--p-ink-2);
199 white-space: nowrap;
200}
201
202[presenter-mode] {
203 padding: var(--rst-sp-1) var(--rst-sp-3);
204 border-radius: 999px;
205 background: var(--p-raised);
206 color: var(--p-ink-2);
207 font-size: 16px;
208 letter-spacing: 0.06em;
209 text-transform: uppercase;
210}
211
212[presenter-black] {
213 padding: var(--rst-sp-1) var(--rst-sp-3);
214 border-radius: 4px;
215 border: 1px solid var(--p-accent);
216 color: var(--p-accent);
217 font-size: 16px;
218 letter-spacing: 0.14em;
219}
220
221/* What the window's script shows and hides as the talk moves
222 (fixtures/presenter-window.mjs): the step count on a slide with no
223 steps, the mode, BLACK. */
224[presenter] [hidden] {
225 display: none !important;
226}
227
228/* A press is always answered here: the step count flashes and the
229 position pulses, restarted on every press, even one that moves
230 nothing at the end of the talk. The script flips the attribute
231 between two copies of one animation, which restarts it. Colour
232 only, so it stays under reduced motion. */
233[presenter-stepcount][data-flash="a"] {
234 animation: presenter-flash-a 0.5s var(--p-ease);
235}
236
237[presenter-stepcount][data-flash="b"] {
238 animation: presenter-flash-b 0.5s var(--p-ease);
239}
240
241[presenter-pos][data-pulse="a"] {
242 animation: presenter-pulse-a 0.5s var(--p-ease);
243}
244
245[presenter-pos][data-pulse="b"] {
246 animation: presenter-pulse-b 0.5s var(--p-ease);
247}
248
249@keyframes presenter-flash-a {
250 from { background: rgb(255 180 84 / 0.28); }
251 to { background: var(--p-raised); }
252}
253
254@keyframes presenter-flash-b {
255 from { background: rgb(255 180 84 / 0.28); }
256 to { background: var(--p-raised); }
257}
258
259@keyframes presenter-pulse-a {
260 from { background: rgb(255 180 84 / 0.28); }
261 to { background: transparent; }
262}
263
264@keyframes presenter-pulse-b {
265 from { background: rgb(255 180 84 / 0.28); }
266 to { background: transparent; }
267}
268
269/* How far getting the talk ready has got, or that this window moves on
270 its own while the network is gone. Quiet, and empty once there is
271 nothing to say. */
272[presenter-status] {
273 min-inline-size: 0;
274 font: 15px/1.3 var(--p-sans);
275 color: var(--p-muted);
276}
277
278[presenter-status]:empty {
279 display: none;
280}
281
282/* Back and Next: the scriptless presses, quiet beside the timer. */
283[presenter-presses] {
284 display: inline-flex;
285 gap: var(--rst-sp-2);
286 margin-inline-start: auto;
287}
288
289[presenter-press] {
290 min-block-size: 40px;
291 padding: var(--rst-sp-1) var(--rst-sp-3);
292 border-radius: 8px;
293 border: 1px solid var(--p-border);
294 color: var(--p-ink-2);
295 font-size: 16px;
296}
297
298[presenter-press]:hover {
299 background: var(--p-raised);
300 color: var(--p-ink);
301}
302
303[presenter-elapsed] {
304 padding: var(--rst-sp-1) var(--rst-sp-3);
305 border-radius: 8px;
306 font: 40px/1.1 var(--p-mono);
307 color: var(--p-ink);
308 transition: background-color 0.2s var(--p-ease);
309}
310
311[presenter-elapsed]:hover {
312 background: var(--p-raised);
313}
314
315[presenter-clock] {
316 font-size: 22px;
317 color: var(--p-muted);
318 white-space: nowrap;
319}
320
321/* The ⋯ menu: a <details>, so it opens with scripts off. */
322[presenter-more-menu] {
323 display: inline-block;
324}
325
326[presenter-more] {
327 inline-size: 40px;
328 block-size: 40px;
329 display: grid;
330 place-items: center;
331 border-radius: 8px;
332 color: var(--p-muted);
333 cursor: pointer;
334 list-style: none;
335}
336
337[presenter-more]::-webkit-details-marker {
338 display: none;
339}
340
341[presenter-more]:hover,
342[presenter-more-menu][open] > [presenter-more] {
343 background: var(--p-raised);
344 color: var(--p-ink);
345}
346
347[presenter-menu] {
348 position: absolute;
349 z-index: 4;
350 inset-block-start: calc(100% + 8px);
351 inset-inline-end: 0;
352 min-inline-size: min(280px, 100%);
353 max-inline-size: 100%;
354 /* What is left under the header, whatever its height: 100% is the
355 header's own (the menu's containing block), and 32px is the
356 window's top padding, the 8px above and 8px below. */
357 max-block-size: calc(100dvh - 100% - 32px);
358 overflow-y: auto;
359 padding: var(--rst-sp-2);
360 display: grid;
361 gap: var(--rst-sp-1);
362 border-radius: 12px;
363 background: var(--p-panel);
364 border: 1px solid var(--p-border);
365 box-shadow: 0 12px 16px rgb(0 0 0 / 0.5);
366 font: 17px/1.5 var(--p-sans);
367}
368
369[presenter-menu] button,
370[presenter-menu] a {
371 display: block;
372 padding: var(--rst-sp-2) var(--rst-sp-3);
373 border-radius: 8px;
374 text-align: start;
375 color: var(--p-ink-2);
376}
377
378[presenter-menu] button:hover,
379[presenter-menu] a:hover {
380 background: var(--p-raised);
381 color: var(--p-ink);
382}
383
384[presenter-menu] hr {
385 inline-size: 100%;
386 border: 0;
387 border-block-start: 1px solid var(--p-border);
388 margin: var(--rst-sp-1) 0;
389}
390
391/* ---- arranging (fixtures/presenter-arrange.mjs) ----
392 Mockup #parrange: a bar under the header saying what to do, with
393 Reset and Done. Each panel is outlined, moves under the pointer or
394 the arrow keys, and resizes from the handle in its corner (or Shift
395 and the arrows). What the panels hold takes no pointer while they
396 are being arranged. */
397[presenter-arrange-bar] {
398 grid-row: 2;
399 min-inline-size: 0;
400 margin-block-end: var(--rst-sp-4);
401 display: flex;
402 flex-wrap: wrap;
403 gap: var(--rst-sp-2) var(--rst-sp-3);
404 align-items: center;
405 padding: var(--rst-sp-2) var(--rst-sp-4);
406 border-radius: 10px;
407 background: var(--p-raised);
408 color: var(--p-ink-2);
409 font-size: 17px;
410}
411
412[presenter-arrange-words] {
413 min-inline-size: 0;
414 margin-inline-end: auto;
415 display: grid;
416 gap: var(--rst-sp-1);
417}
418
419[presenter-arrange-words] small {
420 font-size: 14px;
421 color: var(--p-muted);
422}
423
424[presenter-arrange-status]:empty {
425 display: none;
426}
427
428[presenter-arrange-bar] button {
429 min-block-size: 36px;
430 padding: var(--rst-sp-1) var(--rst-sp-4);
431 border-radius: 8px;
432 border: 1px solid var(--p-border);
433 color: var(--p-ink);
434}
435
436[presenter-arrange-bar] button:hover {
437 background: var(--p-panel);
438}
439
440[presenter][data-arranging] [presenter-panel] {
441 outline: 2px dashed var(--p-accent);
442 outline-offset: -4px;
443 cursor: move;
444 touch-action: none;
445 user-select: none;
446}
447
448[presenter][data-arranging] [presenter-panel]:focus-visible {
449 outline-style: solid;
450 outline-width: 3px;
451 background: rgb(255 180 84 / 0.06);
452}
453
454[presenter][data-arranging] [presenter-panel] > :not([presenter-arrange-handle]) {
455 pointer-events: none;
456}
457
458[presenter][data-arranging] [presenter-tools] {
459 visibility: hidden;
460}
461
462/* The selected panel's eight buttons: one cell a press, so arranging
463 needs no drag. A grid item over the panel's own cells (the script
464 places it), at the panel's corner nearer the middle of the window,
465 across and down. One row whatever the panel's size (it is never
466 narrower than the window allows, never the panel's own width), so it
467 opens into the grid from that corner and stays inside the window. */
468[presenter-arrange-tools] {
469 z-index: 3;
470 align-self: start;
471 inline-size: max-content;
472 max-inline-size: calc(100cqw - 2 * var(--rst-sp-5));
473 margin: var(--rst-sp-3) var(--rst-sp-5);
474 display: flex;
475 flex-wrap: wrap;
476 gap: var(--rst-sp-1);
477 padding: var(--rst-sp-1);
478 border-radius: 10px;
479 background: rgb(24 24 32 / 0.95);
480 border: 1px solid var(--p-border);
481 box-shadow: 0 8px 16px rgb(0 0 0 / 0.45);
482}
483
484[presenter-arrange-tools] button {
485 inline-size: 32px;
486 block-size: 32px;
487 display: grid;
488 place-items: center;
489 border-radius: 8px;
490 color: var(--p-ink-2);
491}
492
493[presenter-arrange-tools] button:hover {
494 background: var(--p-raised);
495 color: var(--p-accent);
496}
497
498[presenter-arrange-tools] button[aria-disabled="true"] {
499 background: none;
500 color: var(--p-faint);
501 cursor: default;
502}
503
504[presenter][data-arranging] [presenter-panel][data-selected] {
505 outline-style: solid;
506}
507
508[presenter-arrange-handle] {
509 position: absolute;
510 z-index: 2;
511 inset-block-end: 6px;
512 inset-inline-end: 6px;
513 inline-size: 24px;
514 block-size: 24px;
515 border-block-end: 3px solid var(--p-accent);
516 border-inline-end: 3px solid var(--p-accent);
517 border-end-end-radius: 4px;
518 cursor: nwse-resize;
519 touch-action: none;
520}
521
522/* The panels stack below 720×560 and the arrangement is ignored there,
523 so there is nothing to arrange. */
524@media (max-width: 719.98px), (max-height: 559.98px) {
525 [presenter-arrange],
526 [presenter-arrange-bar],
527 [presenter-arrange-tools] {
528 display: none !important;
529 }
530}
531
532/* ---- the panels ---- */
533/* --p-now is the width the slide on screen is drawn at, worked out on
534 every panel from the panels' own box (a container), so the slide
535 coming next can be half of it however the window is shaped (the
536 mockup's Next is half its Now). Registered, so it is a length by the
537 time it is inherited: an unregistered one would carry its cqw down
538 and resolve them against the frame instead. */
539@property --p-now {
540 syntax: "<length>";
541 inherits: true;
542 initial-value: 0px;
543}
544
545/* Stacked, in a fixed order: now, next, notes. */
546[presenter-panels] {
547 container-type: size;
548 min-block-size: 0;
549 min-inline-size: 0;
550 display: grid;
551 grid-template-columns: minmax(0, 1fr);
552 grid-template-rows: minmax(0, 5fr) minmax(0, 3fr) minmax(0, 6fr);
553 row-gap: var(--rst-sp-3);
554}
555
556@media (min-width: 720px) and (min-height: 560px) {
557 [presenter-panels] {
558 grid-template-columns: repeat(12, minmax(0, 1fr));
559 grid-template-rows: repeat(12, minmax(0, 1fr));
560 gap: 0;
561 margin: calc(-1 * var(--rst-sp-2)) calc(-1 * var(--rst-sp-4));
562 }
563
564 [presenter-panel] {
565 padding: var(--rst-sp-2) var(--rst-sp-4);
566 }
567}
568
569[presenter-panel] {
570 /* Stacked: rows 5fr 3fr 6fr with two 12px gaps. Now is as wide as
571 its row allows, and no wider than leaves Next, under its 24px label
572 and 8px gap, room for half of it. The arranged window's page
573 <style> says the same for its own grid. */
574 --p-now: min(100cqw, (100cqh - 24px) * 5 / 14 * 16 / 9, ((100cqh - 24px) * 3 / 14 - 32px) * 2 * 16 / 9);
575 position: relative;
576 min-inline-size: 0;
577 min-block-size: 0;
578 overflow: hidden;
579 display: flex;
580 flex-direction: column;
581 gap: var(--rst-sp-2);
582}
583
584/* The room a slide may take: 16:9 inside whatever the panel has left. */
585[presenter-fit] {
586 flex: 1 1 0;
587 min-block-size: 0;
588 container-type: size;
589}
590
591[presenter-frame] {
592 position: relative;
593 container-type: inline-size;
594 inline-size: min(100cqw, 100cqh * 16 / 9, var(--p-now));
595 aspect-ratio: 16 / 9;
596 overflow: hidden;
597 border-radius: 4px;
598 background: var(--p-paper);
599 box-shadow: 0 8px 16px rgb(0 0 0 / 0.45);
600}
601
602/* The slide is laid out exactly as the projector lays it out on a
603 1920×1080 screen, and the whole of it is scaled down to the frame.
604 Laid out at the frame's own size instead, a small frame is a narrow
605 slide container, which slides.css answers with its phone layer
606 (columns collapsed, phone-hidden boxes gone, the 16:9 dropped), and
607 Now and Next would not be what the room sees. Every size in a slide
608 is cqw or a percentage, so 1920 is the projector's layout at any
609 size. tan(atan2(a, b)) is a / b as a plain number. The scaled box
610 is a wrapper (presenter-scale) rather than the section itself. */
611[presenter-scale] {
612 position: absolute;
613 top: 0;
614 left: 0;
615 inline-size: 1920px;
616 block-size: 1080px;
617 transform-origin: 0 0;
618 transform: scale(tan(atan2(100cqw, 1920px)));
619}
620
621/* The section fills the 1920 box, so its padding, a percentage of what
622 holds it, is the projector's too. */
623[presenter-scale] > [slides-slide] {
624 inline-size: 100%;
625 max-inline-size: none;
626 block-size: 100%;
627 aspect-ratio: auto;
628 overflow: auto;
629}
630
631/* Next is half of Now (the mockup's proportion). */
632[presenter-panel="next"] [presenter-frame] {
633 inline-size: min(100cqw, 100cqh * 16 / 9, var(--p-now) / 2);
634 opacity: 0.92;
635}
636
637/* The end of the talk: an empty frame. */
638[presenter-frame][data-end] {
639 background: transparent;
640 border: 1px dashed var(--p-border);
641 box-shadow: none;
642}
643
644[presenter-frame][data-black] {
645 background: #000;
646}
647
648[presenter-frame][data-black] > * {
649 visibility: hidden;
650}
651
652[presenter-next-label] {
653 block-size: 24px;
654 display: flex;
655 align-items: center;
656 gap: var(--rst-sp-2);
657 margin: 0;
658 flex: none;
659 font: 16px/1.5 var(--p-mono);
660 letter-spacing: 0.14em;
661 text-transform: uppercase;
662 color: var(--p-accent);
663}
664
665/* ---- the notes ---- */
666[presenter-notes] {
667 flex: 1 1 0;
668 min-inline-size: 0;
669 min-block-size: 0;
670 overflow-y: auto;
671 background: var(--p-panel);
672 border: 1px solid var(--p-border);
673 border-radius: 12px;
674 padding: 60px var(--rst-sp-5) var(--rst-sp-5); /* spacing-allow: the top is the room the notes' tools take over them (inset, padding and a 36px button) */
675 line-height: 1.45;
676 color: var(--p-ink-2);
677 font-family: var(--p-sans);
678}
679
680[presenter-notes] p {
681 margin: 0 0 0.5em; /* spacing-allow: the notes' type is the presenter's own size (Notes size), so their paragraphs are spaced in its em */
682 max-inline-size: 30em;
683}
684
685[presenter-notes] section {
686 padding-block: 0.35em; /* spacing-allow: in the notes' own em, as their paragraphs */
687}
688
689[presenter-notes] section:empty {
690 display: none;
691}
692
693[presenter-notes] section + section {
694 border-block-start: 1px solid var(--p-border);
695 margin-block-start: 0.5em; /* spacing-allow: in the notes' own em, as their paragraphs */
696 padding-block-start: 0.6em; /* spacing-allow: in the notes' own em, as their paragraphs */
697}
698
699[presenter-notes] section[data-part="past"],
700[presenter-notes] section[data-part="later"] {
701 color: var(--p-muted);
702}
703
704[presenter-notes] section[data-part="now"] {
705 color: var(--p-ink);
706}
707
708/* Notes that scroll fade at the edge that has more (presenter-notes.mjs
709 sets data-fade). */
710[presenter-notes][data-fade="top"] {
711 mask-image: linear-gradient(to bottom, transparent, #000 48px);
712}
713
714[presenter-notes][data-fade="bottom"] {
715 mask-image: linear-gradient(to top, transparent, #000 48px);
716}
717
718[presenter-notes][data-fade="both"] {
719 mask-image: linear-gradient(to bottom, transparent, #000 48px, #000 calc(100% - 48px), transparent);
720}
721
722[presenter-nonotes] {
723 color: var(--p-muted);
724}
725
726[presenter-tools] {
727 position: absolute;
728 inset-block-start: 10px;
729 inset-inline-end: 10px;
730 display: flex;
731 gap: var(--rst-sp-1);
732 padding: var(--rst-sp-1);
733 border-radius: 10px;
734 background: rgb(24 24 32 / 0.92);
735 border: 1px solid var(--p-border);
736 opacity: 0.55;
737 transition: opacity 0.2s var(--p-ease);
738}
739
740@media (min-width: 720px) and (min-height: 560px) {
741 [presenter-tools] {
742 inset-block-start: 18px;
743 inset-inline-end: 26px;
744 }
745}
746
747[presenter-panel="notes"]:hover [presenter-tools],
748[presenter-tools]:focus-within {
749 opacity: 1;
750}
751
752[presenter-tools] button {
753 inline-size: 36px;
754 block-size: 36px;
755 display: grid;
756 place-items: center;
757 border-radius: 8px;
758 color: var(--p-muted);
759}
760
761[presenter-tools] button:hover,
762[presenter-tools] button[aria-pressed="true"] {
763 background: var(--p-raised);
764 color: var(--p-accent);
765}
766
767[presenter-tools] hr {
768 inline-size: 1px;
769 block-size: 20px;
770 align-self: center;
771 border: 0;
772 background: var(--p-border);
773 margin: 0 var(--rst-sp-1);
774}
775
776[presenter-empty] {
777 align-self: center;
778 justify-self: center;
779 max-inline-size: 40rem;
780 overflow: hidden;
781}
782
783/* ---- small windows: the stacked window's header gets quieter ---- */
784@media (max-width: 719.98px), (max-height: 559.98px) {
785 [presenter],
786 [presenter-pick] {
787 padding: var(--rst-sp-2) var(--rst-sp-3);
788 }
789
790 [presenter-head] {
791 gap: var(--rst-sp-2);
792 margin-block-end: var(--rst-sp-2);
793 padding-block-end: var(--rst-sp-2);
794 }
795
796 [presenter-pos] {
797 padding: var(--rst-sp-1) var(--rst-sp-2);
798 font-size: 18px;
799 }
800
801 [presenter-stepcount] {
802 padding: var(--rst-sp-1) var(--rst-sp-2);
803 }
804
805 [presenter-track] {
806 inline-size: 56px;
807 }
808
809 [presenter-steptext] {
810 font-size: 15px;
811 }
812
813 [presenter-mode],
814 [presenter-black],
815 [presenter-press] {
816 font-size: 14px;
817 }
818
819 [presenter-press] {
820 min-block-size: 36px;
821 padding: var(--rst-sp-1) var(--rst-sp-2);
822 }
823
824 [presenter-presses] {
825 margin-inline-start: 0;
826 }
827
828 [presenter-elapsed] {
829 padding: 0 var(--rst-sp-2);
830 font-size: 24px;
831 }
832
833 [presenter-clock] {
834 font-size: 16px;
835 }
836
837 [presenter-more] {
838 inline-size: 36px;
839 block-size: 36px;
840 }
841
842 [presenter-menu] {
843 max-block-size: calc(100dvh - 100% - 24px);
844 }
845
846 [presenter-notes] {
847 padding: 52px var(--rst-sp-4) var(--rst-sp-3); /* spacing-allow: the top is the room the notes' tools take over them */
848 }
849
850 [presenter-next-label] {
851 font-size: 13px;
852 }
853}
854
855/* ---- the scriptless picker ---- */
856[presenter-pick] {
857 display: grid;
858 grid-template-rows: auto minmax(0, 1fr);
859 gap: var(--rst-sp-3);
860}
861
862[presenter-pick-head] {
863 display: flex;
864 flex-wrap: wrap;
865 align-items: baseline;
866 gap: var(--rst-sp-2) var(--rst-sp-4);
867}
868
869[presenter-pick-head] h1 {
870 margin: 0;
871 font-size: 24px;
872}
873
874[presenter-pick-count] {
875 margin: 0;
876 font: 14px/1.5 var(--p-mono);
877 color: var(--p-muted);
878}
879
880[presenter-pick-list] {
881 min-block-size: 0;
882 overflow-y: auto;
883 margin: 0;
884 padding: 2px; /* spacing-allow: room for the items' focus ring inside the list that scrolls */
885 list-style: none;
886 display: grid;
887 grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
888 align-content: start;
889 gap: var(--rst-sp-3);
890}
891
892[presenter-pick-item] {
893 display: grid;
894 gap: var(--rst-sp-2);
895 inline-size: 100%;
896 padding: var(--rst-sp-2);
897 border-radius: 8px;
898 text-align: start;
899 color: var(--p-ink-2);
900 font-size: 14px;
901 line-height: 1.35;
902}
903
904[presenter-pick-item]:hover,
905[presenter-pick-item][aria-current="true"] {
906 background: var(--p-raised);
907 color: var(--p-ink);
908}
909
910[presenter-pick-item] img {
911 display: block;
912 inline-size: 100%;
913 block-size: auto;
914 aspect-ratio: 16 / 9;
915 border-radius: 3px;
916 background: var(--p-paper);
917}
918
919[presenter-pick-item][aria-current="true"] img {
920 outline: 2px solid var(--p-accent);
921 outline-offset: 2px;
922}
923
924[presenter-pick-item] b {
925 font: 600 14px/1.35 var(--p-mono);
926 margin-inline-end: var(--rst-sp-2);
927}
928
929[presenter-pick-item] em {
930 font-style: normal;
931 color: var(--p-muted);
932}
933
934/* ---- the picker under the position (fixtures/presenter-picker.mjs) ----
935 Mockup #pjump: a popover on the header, a field and a count over a
936 grid. Only the grid scrolls, inside itself, so the window never does. */
937[presenter-picker] {
938 position: absolute;
939 z-index: 5;
940 inset-block-start: calc(100% + 8px);
941 inset-inline-start: 0;
942 inline-size: min(calc(100vw - 56px), 880px);
943 max-inline-size: 100%;
944 max-block-size: calc(100dvh - 100% - 32px);
945 box-sizing: border-box;
946 padding: var(--rst-sp-4);
947 display: grid;
948 grid-template-rows: auto minmax(0, 1fr);
949 gap: var(--rst-sp-3);
950 border: 1px solid var(--p-border);
951 border-radius: 12px;
952 background: var(--p-panel);
953 box-shadow: 0 16px 48px rgb(0 0 0 / 0.5);
954 font-family: var(--p-sans);
955}
956
957[presenter-picker][hidden],
958[presenter-picker] [hidden] {
959 display: none;
960}
961
962[presenter-picker-field] {
963 display: flex;
964 align-items: center;
965 gap: var(--rst-sp-2);
966 padding: var(--rst-sp-2) var(--rst-sp-3);
967 border-radius: 8px;
968 background: var(--p-bg);
969 border: 1px solid var(--p-border);
970 color: var(--p-muted);
971}
972
973[presenter-picker-field]:focus-within {
974 border-color: var(--p-accent);
975}
976
977[presenter-picker-field] input {
978 flex: 1;
979 min-inline-size: 0;
980 padding: 0;
981 background: none;
982 border: 0;
983 font: 18px/1.5 var(--p-sans);
984 color: var(--p-ink);
985}
986
987[presenter-picker-field] input::placeholder {
988 color: var(--p-muted);
989}
990
991[presenter-picker-field] input:focus {
992 outline: none;
993}
994
995[presenter-picker-count] {
996 font: 14px/1.5 var(--p-mono);
997 color: var(--p-muted);
998 white-space: nowrap;
999}
1000
1001[presenter-picker-none]:empty {
1002 display: none;
1003}
1004
1005[presenter-picker-none] {
1006 margin: 0;
1007 padding: var(--rst-sp-5) var(--rst-sp-2);
1008 color: var(--p-muted);
1009}
1010
1011[presenter-picker-grid] {
1012 position: relative;
1013 min-block-size: 0;
1014 overflow-y: auto;
1015 display: grid;
1016 grid-template-columns: repeat(auto-fill, minmax(112px, 1fr));
1017 align-content: start;
1018 gap: var(--rst-sp-3);
1019 padding: 2px; /* spacing-allow: room for the items' focus ring inside the grid that scrolls */
1020}
1021
1022[presenter-picker-grid] [presenter-pick-item] {
1023 min-inline-size: 0;
1024}
1025
1026[presenter-picker-grid] [presenter-pick-item] > span {
1027 white-space: nowrap;
1028 overflow: hidden;
1029 text-overflow: ellipsis;
1030}
1031
1032@media (prefers-reduced-motion: reduce) {
1033 [presenter] *,
1034 [presenter-pick] * {
1035 transition: none !important;
1036 }
1037}
1038