@gallerist/theme-default 0.3.3 → 0.4.1

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.
package/README.md CHANGED
@@ -33,6 +33,33 @@ skin (`gallery.css`) and the plugin add-ons (`grid.css` for plugin-grid, `pins.c
33
33
  plugin-pins). To build a skin from scratch, import `base.css` plus the add-ons for the plugins you
34
34
  use, then your own tokens.
35
35
 
36
+ On a phone (600px wide or less) the bar leaves out the zoom tool (`@gallerist/plugin-zoom`): a
37
+ pinch or a double tap zooms, and the renderer's reset button shows while zoomed. An overlay viewer's
38
+ bar leaves out fullscreen (`@gallerist/plugin-fullscreen`) too, as the overlay already fills the
39
+ screen; an inline viewer keeps it. Keep them with `--gallerist-phone-zoom: flex` and
40
+ `--gallerist-phone-fullscreen: grid` on `.gallerist` (each tool's own display; there the zoom tool
41
+ shows − and + only). A bar whose only tools are these two (and `controls: false`) still shows on a
42
+ phone, empty: leave the plugins out there, or keep the tools with the tokens.
43
+
44
+ The bar's tools are `--gallerist-tool-size` (44px) with `--gallerist-tool-icon` glyphs (22px;
45
+ Close's `--gallerist-close-icon`, the tool glyph unless set). With a fine pointer (a mouse or trackpad)
46
+ the Console skin's bar is compact: 36px tools, 18px glyphs, Close's 2px larger (Console sets
47
+ `--gallerist-close-icon` to `--gallerist-tool-icon` + 2px, so it follows a page's glyph size; set it
48
+ too to size Close apart), and plugin-zoom's "− 100% +" one bordered group 30px tall
49
+ (`--gallerist-zoom-group: 1`; 0, the default, keeps three loose tools; a unitless 0 or 1, nothing
50
+ else). A touch keeps 44px targets; Gallery and Editorial keep 44px tools. `--gallerist-close-rule` is
51
+ the room before Close (a length: Console 9px; 0px, the default, none), not the line: the 1 × 20 hairline in it is
52
+ drawn as a border, so forced colours keep it.
53
+
54
+ The rail (`.gallerist-thumbs`) has a `scroll-padding` of `--gallerist-rail-fade` (40px) at its ends,
55
+ inline on a sideways rail and block on a side rail: plugin-thumbnails reads it to keep the current
56
+ card clear of the end fades and the ‹ › buttons in them, and a card focused with Tab lands clear too.
57
+
58
+ The theme follows `forced-colors: active` (Windows High Contrast): the View popover's chosen segment
59
+ takes the system's selection colours and the focus rings the text colour. The rail's
60
+ item clusters (`thumbnails({ cluster })`) use `--gallerist-cluster-inner` (2px) inside a cluster and
61
+ `--gallerist-cluster-gap` (8px) between two.
62
+
36
63
  Full docs: the [monorepo README](https://github.com/shafayet9780/gallerist#readme) and [`docs/`](https://github.com/shafayet9780/gallerist/tree/main/docs).
37
64
 
38
65
  ## License
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gallerist/theme-default",
3
- "version": "0.3.3",
3
+ "version": "0.4.1",
4
4
  "description": "Default Gallerist theme — pure CSS, no JS dependency. Driven by --gallerist-* custom properties.",
5
5
  "license": "MIT",
6
6
  "sideEffects": [
package/src/base.css CHANGED
@@ -15,6 +15,16 @@
15
15
  .gallerist {
16
16
  /* structure: sizes every skin shares (a skin may tune them; the layout lint checks each skin) */
17
17
  --gallerist-target: 44px;
18
+ /* the bar's tools: their box and glyph (Close's glyph its own); Console takes 36 / 18 / 20 with
19
+ a fine pointer. A touch keeps the 44px target. */
20
+ --gallerist-tool-size: var(--gallerist-target);
21
+ --gallerist-tool-icon: 22px;
22
+ --gallerist-close-icon: var(--gallerist-tool-icon);
23
+ /* plugin-zoom's − 100% +: 0 three loose tools, 1 one bordered group a tool's height less 6px
24
+ (Console with a fine pointer) */
25
+ --gallerist-zoom-group: 0;
26
+ /* room before Close, a hairline 20px tall at its start (Console 9px; 0: none) */
27
+ --gallerist-close-rule: 0px;
18
28
  --gallerist-thumb-h: 84px;
19
29
  --gallerist-rail-handle-h: 22px;
20
30
  --gallerist-toolbar-h: 56px; /* toolbar band height; a vertical rail starts below it */
@@ -32,6 +42,7 @@
32
42
  --gallerist-dur-snappy: 340ms;
33
43
  --gallerist-dur-gentle: 280ms;
34
44
  --gallerist-dur-exit: 180ms; /* exits run shorter than entrances */
45
+ --gallerist-dur-panel: 220ms; /* the rail collapsing, the item column opening (plugin-thumbnails) */
35
46
 
36
47
  /* the accent: each skin names its accents as a dark/light pair, the scheme picks one */
37
48
  --gallerist-accent: var(--gallerist-accent-dark);
@@ -79,6 +90,21 @@
79
90
  --gallerist-enter-group: gallerist-enter-group;
80
91
  --gallerist-enter-item: gallerist-enter-item;
81
92
  --gallerist-rail-track-gap: var(--gallerist-rail-bg); /* the ring that cuts the track at a tick */
93
+ /* the line between a flat rail's groups: the hairline, unless a skin's dark scheme lifts it (a
94
+ hairline that reads on a light band all but disappears on a dark one) */
95
+ --gallerist-divider: var(--gallerist-hairline);
96
+ --gallerist-rail-fade: 40px; /* how far a rail's end fades where it has more beyond it */
97
+ /* item clusters (thumbnails `cluster`): the gap inside one, and between two */
98
+ --gallerist-cluster-inner: 2px;
99
+ --gallerist-cluster-gap: 8px;
100
+
101
+ /* popovers (the View menu, the shortcut list) sit a step above the bands; a segmented control
102
+ is a recessed track with its checked segment raised */
103
+ --gallerist-popover-bg: var(--gallerist-panel);
104
+ --gallerist-popover-shadow: var(--gallerist-shadow);
105
+ --gallerist-seg-track: var(--gallerist-bg);
106
+ --gallerist-seg-on: var(--gallerist-surface);
107
+ --gallerist-seg-on-shadow: 0 0 0 1px var(--gallerist-hairline), 0 1px 2px rgb(0 0 0 / 0.25);
82
108
 
83
109
  /* hover: unchanged unless a skin sets one */
84
110
  --gallerist-arrow-hover-bg: var(--gallerist-arrow-bg);
@@ -355,16 +381,56 @@
355
381
  pointer-events: auto;
356
382
  }
357
383
  .gallerist-region-toolbar {
384
+ --_gap: 6px; /* between tools: ::before and ::after cancel it */
358
385
  display: flex;
359
386
  align-items: center;
360
- gap: 6px;
361
- margin-inline-start: auto; /* tools sit at the end of the bar, after the title */
387
+ gap: var(--_gap);
388
+ /* a scroller clips at its padding box, both ways: room for a focused tool's ring (2px + 2px
389
+ offset; +1px at the ends, where Chromium rounds an RTL scroll range down), given back by the
390
+ margin so nothing moves. A tool focus scrolls in stops as far in. The end's room is ::after. */
391
+ padding: 4px 0;
392
+ padding-inline-start: 5px;
393
+ margin: -4px -5px;
394
+ scroll-padding-inline: 5px;
362
395
  /* on a narrow screen the tools scroll sideways so the counter and Close always fit */
363
- flex: 0 1 auto;
396
+ flex: 1 1 auto;
364
397
  min-width: 0;
365
398
  overflow-x: auto;
366
399
  scrollbar-width: none;
367
- pointer-events: auto;
400
+ /* no pointer-events: like every region it passes them through but on its tools, so the bar's
401
+ free space it spans is the bar's (in immersive, the image's under it), and so is the 1px its
402
+ margin takes from what is before it on a phone (the bar's gap is 4px there) */
403
+ }
404
+ /* tools sit at the end of the bar: the strip takes the free space (a shown title shares it), its
405
+ tools after this auto margin (0 once they overflow; the gap after it cancelled) */
406
+ .gallerist-region-toolbar::before {
407
+ content: "";
408
+ margin-inline: auto calc(-1 * var(--_gap));
409
+ }
410
+ /* the room after the last tool, as a box: WebKit leaves a flex scroller's end padding out of its
411
+ scroll range */
412
+ .gallerist-region-toolbar::after {
413
+ content: "";
414
+ flex: none;
415
+ width: 5px;
416
+ margin-inline-start: calc(-1 * var(--_gap));
417
+ }
418
+ /* no tools, or (where :has() works) none shown: no room either, so nothing else moves */
419
+ .gallerist-region-toolbar:empty {
420
+ padding: 0;
421
+ margin: 0;
422
+ }
423
+ .gallerist-region-toolbar:empty::before,
424
+ .gallerist-region-toolbar:empty::after {
425
+ display: none;
426
+ }
427
+ .gallerist-region-toolbar:not(:has(> :not([hidden]))) {
428
+ padding: 0;
429
+ margin: 0;
430
+ }
431
+ .gallerist-region-toolbar:not(:has(> :not([hidden])))::before,
432
+ .gallerist-region-toolbar:not(:has(> :not([hidden])))::after {
433
+ display: none;
368
434
  }
369
435
  .gallerist-region-toolbar::-webkit-scrollbar {
370
436
  display: none;
@@ -415,26 +481,124 @@
415
481
 
416
482
  /* ── thumbnails rail (plugin-thumbnails) ───────────────────────────────────── */
417
483
  /* the region wrapper: holds the scrollable rail plus the floating item/peek panels as siblings, so
418
- the panels escape the rail's overflow-clip yet still ride along when the region is re-mounted. */
484
+ the panels escape the rail's overflow-clip yet still ride along when the region is re-mounted. It
485
+ paints the rail's band, so the strip inside can fade its ends without fading the band. */
419
486
  .gallerist-thumbs-region {
420
487
  position: relative;
421
488
  display: flex;
422
489
  align-items: center;
423
490
  min-width: 0;
491
+ background: var(--gallerist-rail-bg);
492
+ border-block-start: var(--gallerist-rail-border);
493
+ backdrop-filter: var(--gallerist-blur);
424
494
  }
425
495
  .gallerist-thumbs-region > .gallerist-thumbs {
426
496
  flex: 1 1 auto;
427
497
  min-width: 0;
428
498
  }
499
+ /* the strip: no scrollbar (a mouse drags it, a wheel scrolls it, ‹ › page it; plugin-thumbnails),
500
+ no text or image selection while it's pulled; an end with more beyond it fades */
429
501
  .gallerist-thumbs {
502
+ --_fade-to: to right;
503
+ --_fade-start: 0px;
504
+ --_fade-end: 0px;
430
505
  display: flex;
431
506
  gap: 8px;
432
507
  align-items: center;
433
508
  padding: 8px 12px;
434
509
  overflow-x: auto;
435
- background: var(--gallerist-rail-bg);
436
- border-block-start: var(--gallerist-rail-border);
510
+ /* a card brought into view (the current one, a focused one) lands clear of the end fades, and of
511
+ the ‹ › page buttons in them (plugin-thumbnails reads it) */
512
+ scroll-padding-inline: var(--gallerist-rail-fade);
513
+ scrollbar-width: none;
514
+ -webkit-user-select: none;
515
+ user-select: none;
516
+ }
517
+ .gallerist-thumbs::-webkit-scrollbar {
518
+ display: none;
519
+ }
520
+ .gallerist-thumbs img {
521
+ -webkit-user-drag: none;
522
+ }
523
+ .gallerist-thumbs[data-gallerist-scroll="y"] {
524
+ --_fade-to: to bottom;
525
+ scroll-padding: var(--gallerist-rail-fade) 0;
526
+ }
527
+ .gallerist[data-gallerist-dir="rtl"] .gallerist-thumbs[data-gallerist-scroll="x"] {
528
+ --_fade-to: to left;
529
+ }
530
+ .gallerist-thumbs[data-gallerist-more-start] {
531
+ --_fade-start: var(--gallerist-rail-fade);
532
+ }
533
+ .gallerist-thumbs[data-gallerist-more-end] {
534
+ --_fade-end: var(--gallerist-rail-fade);
535
+ }
536
+ .gallerist-thumbs:is([data-gallerist-more-start], [data-gallerist-more-end]) {
537
+ -webkit-mask-image: linear-gradient(
538
+ var(--_fade-to),
539
+ transparent,
540
+ #000 var(--_fade-start),
541
+ #000 calc(100% - var(--_fade-end)),
542
+ transparent
543
+ );
544
+ mask-image: linear-gradient(
545
+ var(--_fade-to),
546
+ transparent,
547
+ #000 var(--_fade-start),
548
+ #000 calc(100% - var(--_fade-end)),
549
+ transparent
550
+ );
551
+ }
552
+ @media (pointer: fine) {
553
+ .gallerist-thumbs:is([data-gallerist-more-start], [data-gallerist-more-end]) {
554
+ cursor: grab;
555
+ }
556
+ }
557
+ .gallerist-thumbs[data-gallerist-dragging],
558
+ .gallerist-thumbs[data-gallerist-dragging] * {
559
+ cursor: grabbing;
560
+ }
561
+ /* ‹ › at a sideways strip's ends, while there's more that way: for a mouse, on hover (the keys
562
+ already walk the rail, so they're out of the tab order and hidden from assistive tech) */
563
+ .gallerist-rail-page {
564
+ position: absolute;
565
+ z-index: 3;
566
+ display: grid;
567
+ place-items: center;
568
+ width: 30px;
569
+ height: 30px;
570
+ margin-inline: 6px;
571
+ padding: 0;
572
+ translate: 0 -50%;
573
+ border: 1px solid var(--gallerist-hairline);
574
+ border-radius: 50%;
575
+ background: var(--gallerist-chrome-bg);
576
+ color: var(--gallerist-fg);
577
+ box-shadow: 0 2px 8px rgb(0 0 0 / 0.25);
437
578
  backdrop-filter: var(--gallerist-blur);
579
+ cursor: pointer;
580
+ opacity: 0;
581
+ pointer-events: none;
582
+ transition: opacity var(--gallerist-dur-exit) var(--gallerist-ease-out);
583
+ }
584
+ .gallerist-rail-page[hidden] {
585
+ display: none;
586
+ }
587
+ .gallerist-rail-page .gallerist-icon {
588
+ width: 16px;
589
+ height: 16px;
590
+ }
591
+ .gallerist[data-gallerist-dir="rtl"] .gallerist-rail-page .gallerist-icon {
592
+ transform: scaleX(-1);
593
+ }
594
+ @media (hover: hover) and (pointer: fine) {
595
+ .gallerist-thumbs-region:hover > .gallerist-rail-page {
596
+ opacity: 1;
597
+ pointer-events: auto;
598
+ }
599
+ .gallerist-rail-page:hover {
600
+ background: var(--gallerist-tool-hover-bg, var(--gallerist-chrome-bg));
601
+ }
438
602
  }
439
603
  /* cards stack image + (optional) caption band; height grows for the caption */
440
604
  .gallerist-thumb {
@@ -553,7 +717,7 @@
553
717
  }
554
718
  /* collapsing the rail puts its item stack away too (fullscreen, `t`, rail: 'hidden'); a rail switched
555
719
  to flat or index leaves the column hidden */
556
- .gallerist[data-gallerist-rail="collapsed"] .gallerist-thumbs-aside,
720
+ .gallerist[data-gallerist-rail="collapsed"] .gallerist-thumbs-aside:not([data-gallerist-glide]),
557
721
  .gallerist-thumbs-aside[hidden] {
558
722
  display: none;
559
723
  }
@@ -590,18 +754,16 @@
590
754
  .gallerist-thumbs[data-timeline] {
591
755
  align-items: flex-start;
592
756
  }
593
- .gallerist-thumbs[data-timeline] .gallerist-thumb-wrap {
594
- flex-direction: column;
595
- gap: 6px;
596
- }
597
757
  .gallerist-thumb-time {
598
758
  position: relative;
599
759
  display: flex;
600
760
  align-items: center;
601
761
  gap: 6px;
602
762
  height: 14px;
603
- /* a label never widens its card's column: long ones end in an ellipsis */
604
- max-width: calc(var(--gallerist-thumb-h) * 1.4);
763
+ /* a label longer than its card (a range with a host's meta at its end) runs past it: its column
764
+ widens, so it shows whole and clear of the next card's label; past three card heights it ends
765
+ in an ellipsis, the whole label in its title (as a flat rail's group label does) */
766
+ max-width: calc(var(--gallerist-thumb-h) * 3);
605
767
  font: 500 11px var(--gallerist-mono);
606
768
  font-variant-numeric: tabular-nums;
607
769
  color: var(--gallerist-fg-muted);
@@ -612,22 +774,31 @@
612
774
  overflow: hidden;
613
775
  text-overflow: ellipsis;
614
776
  }
615
- /* a side rail runs top to bottom: no horizontal track between the cards */
777
+ /* a side rail runs top to bottom: no horizontal track between the cards, and a label keeps to the
778
+ rail's width (a card's) */
779
+ .gallerist[data-gallerist-orientation="vertical"] .gallerist-thumb-time {
780
+ max-width: calc(var(--gallerist-thumb-h) * 1.4);
781
+ }
616
782
  .gallerist[data-gallerist-orientation="vertical"] .gallerist-thumb-time::after {
617
783
  display: none;
618
784
  }
619
- /* a timeline label sits above the card, so the touch expand caret moves down onto the card */
785
+ /* a timeline label sits above the card, so the touch expand caret moves down onto the card (its
786
+ left corner: right to left, the card keeps to the right of a column a long label widened) */
620
787
  .gallerist-thumbs[data-timeline] .gallerist-thumb-expand {
621
788
  top: calc(14px + 6px + 4px);
622
789
  }
790
+ .gallerist[data-gallerist-dir="rtl"] .gallerist-thumbs[data-timeline] .gallerist-thumb-expand {
791
+ left: auto;
792
+ right: calc(var(--gallerist-thumb-h) * 1.4 - 26px);
793
+ }
623
794
  /* a side rail's band edge faces the stage, not the bar */
624
- .gallerist[data-gallerist-orientation="vertical"] .gallerist-thumbs {
795
+ .gallerist[data-gallerist-orientation="vertical"] .gallerist-thumbs-region {
625
796
  border-block-start: 0 none;
626
797
  }
627
- .gallerist[data-gallerist-rail-pos="left"] .gallerist-thumbs {
798
+ .gallerist[data-gallerist-rail-pos="left"] .gallerist-thumbs-region {
628
799
  border-right: var(--gallerist-rail-border);
629
800
  }
630
- .gallerist[data-gallerist-rail-pos="right"] .gallerist-thumbs {
801
+ .gallerist[data-gallerist-rail-pos="right"] .gallerist-thumbs-region {
631
802
  border-left: var(--gallerist-rail-border);
632
803
  }
633
804
  .gallerist-thumb-time::before {
@@ -710,6 +881,8 @@
710
881
  position: relative;
711
882
  flex: 0 0 auto;
712
883
  display: flex;
884
+ flex-direction: column; /* a label over the card, a host's meta under it (the caret floats) */
885
+ gap: 6px;
713
886
  }
714
887
  .gallerist-thumb-expand {
715
888
  position: absolute;
@@ -748,13 +921,21 @@
748
921
  justify-content: flex-end; /* the item rows line up, labelled or not */
749
922
  gap: 6px;
750
923
  }
751
- /* the divider: the same room on both sides of it (the rail's gap, then this padding) */
752
- .gallerist-thumb-group + .gallerist-thumb-group {
924
+ /* the divider: the same room on both sides of it (the rail's gap, then this padding); a marker
925
+ between two groups has one on each side */
926
+ /* (as specific as 0.3's `.gallerist-thumb-group + .gallerist-thumb-group`, so a page's rule for it
927
+ still wins) */
928
+ .gallerist-thumbs:where([data-display="flat"])
929
+ > :where(.gallerist-thumb-group, .gallerist-rail-marker)
930
+ + :is(.gallerist-thumb-group, .gallerist-rail-marker) {
753
931
  padding-inline-start: 12px;
754
- border-inline-start: 1px solid var(--gallerist-hairline);
932
+ border-inline-start: 1px solid var(--gallerist-divider);
755
933
  }
934
+ /* a label wider than its items widens its group (a one-item group under a time range), so it shows
935
+ whole and clear of the next group's divider; past three card heights it ends in an ellipsis (the
936
+ whole label in its title) */
756
937
  .gallerist-thumb-group-cap {
757
- contain: inline-size; /* a long label ends in an ellipsis instead of widening its group */
938
+ max-width: calc(var(--gallerist-thumb-h) * 3);
758
939
  font: 500 11px / 14px var(--gallerist-font);
759
940
  color: var(--gallerist-fg-muted);
760
941
  white-space: nowrap;
@@ -764,7 +945,7 @@
764
945
  .gallerist-thumbs[data-timeline] .gallerist-thumb-group-cap {
765
946
  font-family: var(--gallerist-mono);
766
947
  }
767
- .gallerist-thumb-group[data-active] > .gallerist-thumb-group-cap {
948
+ .gallerist-thumb-group[data-active] .gallerist-thumb-group-cap {
768
949
  color: var(--gallerist-accent);
769
950
  }
770
951
  .gallerist-thumb-group-row {
@@ -784,10 +965,154 @@
784
965
  flex-direction: column;
785
966
  align-items: flex-start;
786
967
  }
787
- .gallerist[data-gallerist-orientation="vertical"] .gallerist-thumb-group + .gallerist-thumb-group {
968
+ /* down a side rail a group is the rail's width: a long label ends in an ellipsis there */
969
+ .gallerist[data-gallerist-orientation="vertical"]
970
+ :is(.gallerist-thumb-group-cap, .gallerist-thumb-group-head) {
971
+ contain: inline-size;
972
+ }
973
+ .gallerist[data-gallerist-orientation="vertical"]
974
+ .gallerist-thumbs:where([data-display="flat"])
975
+ > :where(.gallerist-thumb-group, .gallerist-rail-marker)
976
+ + :is(.gallerist-thumb-group, .gallerist-rail-marker) {
788
977
  padding: 12px 0 0;
789
978
  border-inline-start: 0;
790
- border-block-start: 1px solid var(--gallerist-hairline);
979
+ border-block-start: 1px solid var(--gallerist-divider);
980
+ }
981
+
982
+ /* ── host decorations (thumbnails `renderGroupMeta`, `renderItemBadge`, `cluster`, `markers`) ──── */
983
+ /* a group's meta: at the end of its label line (flat: the group widens for it, the label still
984
+ capped at three card heights), under a stacked card at its width, or at the end of its time label */
985
+ .gallerist-thumb-meta {
986
+ display: flex;
987
+ align-items: center;
988
+ gap: 4px;
989
+ min-width: 0;
990
+ font: 500 11px / 14px var(--gallerist-mono);
991
+ font-variant-numeric: tabular-nums;
992
+ color: var(--gallerist-fg-muted);
993
+ white-space: nowrap;
994
+ }
995
+ .gallerist-thumb-group-head {
996
+ display: flex;
997
+ align-items: center;
998
+ gap: 12px; /* the label, then the meta (the mockup) */
999
+ min-height: 14px;
1000
+ }
1001
+ .gallerist-thumb-group-head[hidden] {
1002
+ display: none;
1003
+ }
1004
+ :is(.gallerist-thumb-group-head, .gallerist-thumb-time) > .gallerist-thumb-meta {
1005
+ flex: none;
1006
+ margin-inline-start: auto;
1007
+ }
1008
+ .gallerist-thumb-wrap > .gallerist-thumb-meta {
1009
+ box-sizing: border-box;
1010
+ width: calc(var(--gallerist-thumb-h) * 1.4);
1011
+ min-height: 14px;
1012
+ }
1013
+ /* an item's badge: the top end corner (a number from `numberItems` has the start) */
1014
+ .gallerist-thumb-badge {
1015
+ position: absolute;
1016
+ top: 3px;
1017
+ inset-inline-end: 3px;
1018
+ display: flex;
1019
+ align-items: center;
1020
+ gap: 2px;
1021
+ height: 14px;
1022
+ padding: 0 3px;
1023
+ box-sizing: border-box;
1024
+ border-radius: 2px;
1025
+ background: var(--gallerist-badge-bg);
1026
+ color: var(--gallerist-fg);
1027
+ font: 600 9px / 14px var(--gallerist-mono);
1028
+ pointer-events: none;
1029
+ }
1030
+ .gallerist-thumb-badge svg {
1031
+ width: 10px;
1032
+ height: 10px;
1033
+ }
1034
+ /* clusters: close inside one, a wider gap where a new one starts (the rows' gap is 6px) */
1035
+ .gallerist-thumb-item[data-cluster="in"] {
1036
+ --_cluster: calc(var(--gallerist-cluster-inner) - 6px);
1037
+ }
1038
+ .gallerist-thumb-item[data-cluster="start"] {
1039
+ --_cluster: calc(var(--gallerist-cluster-gap) - 6px);
1040
+ }
1041
+ .gallerist-thumb-item[data-cluster]:not(:first-child) {
1042
+ margin-inline-start: var(--_cluster);
1043
+ }
1044
+ /* 2px apart, a neighbour would paint over part of a focused thumb's ring */
1045
+ .gallerist-thumb-item:focus-visible {
1046
+ z-index: 1;
1047
+ }
1048
+ :is(
1049
+ .gallerist-thumb-items[data-axis="vertical"],
1050
+ .gallerist-thumb-peek:not([data-axis="horizontal"]),
1051
+ .gallerist[data-gallerist-orientation="vertical"] .gallerist-thumb-group-row,
1052
+ .gallerist[data-gallerist-orientation="vertical"] .gallerist-thumb-items
1053
+ )
1054
+ > .gallerist-thumb-item[data-cluster]:not(:first-child) {
1055
+ margin-inline-start: 0;
1056
+ margin-block-start: var(--_cluster);
1057
+ }
1058
+ /* a marker between groups (not an item): a dashed box the height of the rail's cards, under a
1059
+ label line like a group's */
1060
+ .gallerist-rail-marker {
1061
+ flex: 0 0 auto;
1062
+ display: flex;
1063
+ flex-direction: column;
1064
+ justify-content: flex-end; /* flat: in line with the item rows */
1065
+ gap: 6px;
1066
+ -webkit-touch-callout: none; /* a long press shows its tip, not the system menu */
1067
+ }
1068
+ .gallerist-rail-marker-cap {
1069
+ height: 14px;
1070
+ font: 500 11px / 14px var(--gallerist-font);
1071
+ color: var(--gallerist-fg-muted);
1072
+ white-space: nowrap;
1073
+ }
1074
+ .gallerist-rail-marker-body {
1075
+ display: flex;
1076
+ align-items: center;
1077
+ justify-content: center;
1078
+ gap: 4px;
1079
+ box-sizing: border-box;
1080
+ min-width: calc(var(--gallerist-thumb-h) * 0.8);
1081
+ height: calc(var(--gallerist-thumb-h) * 0.7 + 4px);
1082
+ padding: 0 10px;
1083
+ border: 1px dashed var(--gallerist-fg-muted);
1084
+ border-radius: var(--gallerist-thumb-radius);
1085
+ color: var(--gallerist-fg-muted);
1086
+ font: 500 11px / 1.2 var(--gallerist-mono);
1087
+ white-space: nowrap;
1088
+ }
1089
+ /* stacked: the cards' height, under the time labels' line */
1090
+ .gallerist-thumbs:not([data-display]) > .gallerist-rail-marker {
1091
+ justify-content: flex-start;
1092
+ }
1093
+ .gallerist-thumbs:not([data-display]) .gallerist-rail-marker-body {
1094
+ height: calc(var(--gallerist-thumb-h) + 4px);
1095
+ }
1096
+ /* down a side rail: a short box across the rail */
1097
+ .gallerist[data-gallerist-orientation="vertical"] .gallerist-rail-marker-body {
1098
+ height: 32px;
1099
+ }
1100
+ /* a marker's tip (hover, long press): in the rail's region, which doesn't clip */
1101
+ .gallerist-rail-tip {
1102
+ position: absolute;
1103
+ top: 0;
1104
+ left: 0;
1105
+ z-index: 8;
1106
+ box-sizing: border-box;
1107
+ max-width: min(280px, 80vw);
1108
+ padding: 8px 10px;
1109
+ border-radius: var(--gallerist-radius);
1110
+ background: var(--gallerist-flyout-bg);
1111
+ color: var(--gallerist-fg);
1112
+ box-shadow: var(--gallerist-shadow);
1113
+ backdrop-filter: var(--gallerist-blur);
1114
+ font: 12px / 1.4 var(--gallerist-font);
1115
+ pointer-events: none;
791
1116
  }
792
1117
 
793
1118
  /* ── chrome buttons (one look for bar tools, arrows, item navigator, plugin buttons) ───────── */
@@ -808,6 +1133,8 @@
808
1133
  backdrop-filter: var(--gallerist-blur);
809
1134
  }
810
1135
  .gallerist-bar button {
1136
+ min-width: var(--gallerist-tool-size);
1137
+ min-height: var(--gallerist-tool-size);
811
1138
  border: var(--gallerist-tool-border);
812
1139
  background: var(--gallerist-tool-bg);
813
1140
  color: var(--gallerist-tool-fg);
@@ -860,87 +1187,449 @@
860
1187
  display: block;
861
1188
  pointer-events: none;
862
1189
  }
1190
+ .gallerist-bar .gallerist-icon {
1191
+ width: var(--gallerist-tool-icon);
1192
+ height: var(--gallerist-tool-icon);
1193
+ }
1194
+ .gallerist-bar .gallerist-close .gallerist-icon {
1195
+ width: var(--gallerist-close-icon);
1196
+ height: var(--gallerist-close-icon);
1197
+ }
1198
+ /* a hairline before Close, in the room --gallerist-close-rule makes (none at 0) */
1199
+ .gallerist-bar .gallerist-close {
1200
+ position: relative;
1201
+ margin-inline-start: var(--gallerist-close-rule);
1202
+ }
1203
+ .gallerist-bar .gallerist-close::before {
1204
+ content: "";
1205
+ position: absolute;
1206
+ inset-inline-start: calc(-1 * var(--gallerist-close-rule));
1207
+ top: calc(50% - 10px);
1208
+ height: 20px;
1209
+ /* a border, not a background: forced colours keep a border's line (in the text colour) */
1210
+ border-inline-start: min(1px, var(--gallerist-close-rule)) solid var(--gallerist-hairline);
1211
+ pointer-events: none;
1212
+ }
863
1213
 
864
- /* ── the View menu (plugin-view): a dropdown under its bar tool ──────────────────── */
1214
+ /* ── the zoom tool (plugin-zoom): − 100% + ───────────────────────────────────────── */
1215
+ /* --gallerist-zoom-group (--_g) 0: three tools 2px apart; 1: one group in a hairline, its parts
1216
+ 6px narrower and 8px shorter than a tool (30 × 28 of 36), the percentage between two hairlines */
1217
+ .gallerist-zoom-tool {
1218
+ --_g: var(--gallerist-zoom-group);
1219
+ display: flex;
1220
+ align-items: center;
1221
+ gap: calc(2px - 2px * var(--_g));
1222
+ border: calc(1px * var(--_g)) solid var(--gallerist-hairline);
1223
+ border-radius: var(--gallerist-radius);
1224
+ }
1225
+ .gallerist-zoom-tool[hidden] {
1226
+ display: none;
1227
+ }
1228
+ /* (a bar tool's specificity, so the percentage's own width wins) */
1229
+ .gallerist-zoom-tool > button {
1230
+ min-width: calc(var(--gallerist-tool-size) - 6px * var(--_g));
1231
+ min-height: calc(var(--gallerist-tool-size) - 8px * var(--_g));
1232
+ border-radius: calc(var(--gallerist-control-radius) * (1 - var(--_g)));
1233
+ }
1234
+ /* the group's ends follow its corners */
1235
+ .gallerist-bar .gallerist-zoom-tool > :first-child {
1236
+ border-start-start-radius: var(--_r);
1237
+ border-end-start-radius: var(--_r);
1238
+ }
1239
+ .gallerist-bar .gallerist-zoom-tool > :last-child {
1240
+ border-start-end-radius: var(--_r);
1241
+ border-end-end-radius: var(--_r);
1242
+ }
1243
+ .gallerist-zoom-tool > * {
1244
+ --_r: calc(
1245
+ var(--gallerist-control-radius) *
1246
+ (1 - var(--_g)) +
1247
+ (var(--gallerist-radius) - 1px) *
1248
+ var(--_g)
1249
+ );
1250
+ }
1251
+ .gallerist-bar .gallerist-zoom-tool .gallerist-icon {
1252
+ width: calc(var(--gallerist-tool-icon) - 3px * var(--_g));
1253
+ height: calc(var(--gallerist-tool-icon) - 3px * var(--_g));
1254
+ }
1255
+ .gallerist-bar .gallerist-zoom-level {
1256
+ min-width: 4.5em;
1257
+ padding: 0 4px;
1258
+ font: 600 calc(13px - 1px * var(--_g)) / 1 var(--gallerist-mono);
1259
+ font-variant-numeric: tabular-nums;
1260
+ border-inline: calc(1px * var(--_g)) solid var(--gallerist-hairline);
1261
+ }
1262
+ /* at fit there's nothing to reset: the percentage keeps its colour */
1263
+ .gallerist-bar .gallerist-zoom-level[aria-disabled="true"] {
1264
+ opacity: 1;
1265
+ cursor: default;
1266
+ }
1267
+ .gallerist-bar .gallerist-zoom-level[aria-disabled="true"]:hover {
1268
+ background: var(--gallerist-tool-bg);
1269
+ }
1270
+ /* the percentage resets the zoom: the renderer's own reset button would say it twice (while the
1271
+ tool shows: a hidden one, or one a phone leaves out, leaves the reset where it was) */
1272
+ .gallerist-bar:has(.gallerist-zoom-tool:not([hidden])) > .gallerist-zoom-reset {
1273
+ display: none;
1274
+ }
1275
+ /* a narrow screen keeps − and + (a pinch zooms there, a double tap fits), where it keeps the tool */
1276
+ @media (max-width: 600px) {
1277
+ .gallerist-bar .gallerist-zoom-level {
1278
+ display: none;
1279
+ }
1280
+ }
1281
+ /* A phone (600px wide or less) leaves the zoom tool out of the bar (a pinch or a double tap zooms),
1282
+ and an overlay viewer's fullscreen (it fills the screen already; an inline one keeps it). A page
1283
+ keeps them by setting --gallerist-phone-zoom: flex and --gallerist-phone-fullscreen: grid (their
1284
+ own display). The renderer's reset shows there while zoomed, as without the tool: the percentage,
1285
+ which resets, is the part of the tool a phone never shows. */
1286
+ @media (max-width: 600px) {
1287
+ .gallerist-bar .gallerist-zoom-tool:not([hidden]) {
1288
+ display: var(--gallerist-phone-zoom, none);
1289
+ }
1290
+ .gallerist-bar:has(.gallerist-zoom-tool:not([hidden])) > .gallerist-zoom-reset:not([hidden]) {
1291
+ display: grid;
1292
+ }
1293
+ .gallerist[data-gallerist-mode="overlay"] .gallerist-bar .gallerist-fullscreen-btn:not([hidden]) {
1294
+ display: var(--gallerist-phone-fullscreen, none);
1295
+ }
1296
+ }
1297
+
1298
+ /* ── the View menu (plugin-view): a popover under its bar tool ───────────────────── */
865
1299
  /* The plugin puts it in the viewer root (the toolbar strip scrolls, so it would clip it) and sets its
866
- top / left under the button; it is as small as its choices, so it covers only the stage's top edge. */
1300
+ top / left under the button; it is as small as its choices, so it covers only the stage's top edge.
1301
+ A grid of two columns: each setting's name, then its segmented control; the shortcut row spans. */
867
1302
  .gallerist-view-menu {
868
1303
  position: absolute;
869
1304
  top: 0;
870
1305
  left: 0;
871
1306
  z-index: 10;
872
1307
  box-sizing: border-box;
873
- min-width: 168px;
1308
+ display: grid;
1309
+ grid-template-columns: auto minmax(0, 1fr);
1310
+ align-items: center;
1311
+ gap: 12px 10px;
1312
+ width: max-content;
874
1313
  max-width: calc(100% - 16px);
875
1314
  overflow-y: auto;
876
- padding: 4px;
1315
+ padding: 12px 12px 6px;
1316
+ padding-inline-start: 16px;
877
1317
  border: 1px solid var(--gallerist-hairline);
878
- border-radius: var(--gallerist-radius);
879
- background: var(--gallerist-panel);
1318
+ border-radius: calc(var(--gallerist-radius) + 3px);
1319
+ background: var(--gallerist-popover-bg);
880
1320
  backdrop-filter: var(--gallerist-blur);
881
- box-shadow: var(--gallerist-shadow);
1321
+ box-shadow: var(--gallerist-popover-shadow);
882
1322
  color: var(--gallerist-fg);
883
- font: 400 14px / 1.3 var(--gallerist-font);
884
- }
885
- .gallerist-view-group + .gallerist-view-group {
886
- margin-block-start: 4px;
887
- padding-block-start: 4px;
888
- border-block-start: 1px solid var(--gallerist-hairline);
1323
+ font: 400 12.5px / 1.3 var(--gallerist-font);
889
1324
  }
890
- .gallerist-view-heading {
891
- padding: 6px 10px 4px;
1325
+ .gallerist-view-label {
892
1326
  color: var(--gallerist-fg-muted);
893
- font-size: 11px;
894
- font-weight: 600;
895
- letter-spacing: 0.06em;
896
- text-transform: uppercase;
1327
+ font-weight: 500;
1328
+ }
1329
+ /* a segmented control: a recessed track, the checked segment raised on it */
1330
+ .gallerist-view-seg {
1331
+ display: grid;
1332
+ grid-auto-columns: 1fr;
1333
+ grid-auto-flow: column;
1334
+ gap: 2px;
1335
+ padding: 2px;
1336
+ border: 1px solid var(--gallerist-hairline);
1337
+ border-radius: calc(var(--gallerist-radius) + 1px);
1338
+ background: var(--gallerist-seg-track);
897
1339
  }
898
1340
  .gallerist-view-item {
899
- display: flex;
1341
+ display: inline-flex;
900
1342
  align-items: center;
901
- gap: 10px;
902
- min-height: 36px;
903
- padding-inline: 10px 14px;
904
- border-radius: min(var(--gallerist-radius), 6px);
1343
+ justify-content: center;
1344
+ gap: 7px;
1345
+ height: 28px;
1346
+ margin: 0;
1347
+ padding: 0 12px;
1348
+ border: 0;
1349
+ border-radius: max(0px, var(--gallerist-radius) - 1px);
1350
+ background: transparent;
1351
+ color: var(--gallerist-fg-muted);
1352
+ font: inherit;
1353
+ font-weight: 500;
1354
+ white-space: nowrap;
905
1355
  cursor: pointer;
906
1356
  user-select: none;
907
1357
  -webkit-user-select: none;
908
1358
  }
909
- /* a radio mark: a ring, filled in the selection colour for the checked choice */
910
- .gallerist-view-item::before {
911
- content: "";
1359
+ .gallerist-view-icon {
912
1360
  flex: none;
913
- box-sizing: border-box;
914
- width: 14px;
915
- height: 14px;
916
- border: 1.5px solid currentColor;
917
- border-radius: 50%;
918
- opacity: 0.6;
919
- }
920
- .gallerist-view-item[aria-checked="true"]::before {
921
- border-color: var(--gallerist-selection);
922
- background: radial-gradient(circle, var(--gallerist-selection) 0 3px, transparent 3.5px);
923
- opacity: 1;
1361
+ width: 15px;
1362
+ height: 15px;
1363
+ stroke-width: 1.75;
924
1364
  }
925
- /* the pointer's item takes the tool hover fill, the keyboard's the focus ring: the two never look
926
- alike (nor like the checked mark) when they are different items */
927
1365
  .gallerist-view-item:hover {
928
- background: var(--gallerist-tool-hover-bg);
1366
+ color: var(--gallerist-fg);
929
1367
  }
930
- .gallerist-view-item:focus {
1368
+ /* the checked segment: raised, full-strength text, its glyph in the selection colour */
1369
+ .gallerist-view-item[aria-checked="true"] {
1370
+ background: var(--gallerist-seg-on);
1371
+ box-shadow: var(--gallerist-seg-on-shadow);
1372
+ color: var(--gallerist-fg);
1373
+ }
1374
+ .gallerist-view-item[aria-checked="true"] .gallerist-view-icon {
1375
+ color: var(--gallerist-selection);
1376
+ }
1377
+ /* the keyboard's segment takes the skin's focus ring, never the selection colour, so focus and the
1378
+ checked value don't look alike */
1379
+ .gallerist-view-item:focus,
1380
+ .gallerist-view-foot:focus {
931
1381
  outline: none;
932
1382
  }
933
- .gallerist-view-item:focus-visible {
1383
+ .gallerist-view-item:focus-visible,
1384
+ .gallerist-view-foot:focus-visible {
1385
+ position: relative;
934
1386
  outline: 2px solid var(--gallerist-focus);
935
- outline-offset: -2px;
1387
+ outline-offset: 1px;
936
1388
  }
937
- /* its button reads as held while the menu is open */
1389
+ /* the shortcut list's row (plugin-shortcuts): spans both columns under a hairline */
1390
+ .gallerist-view-foot {
1391
+ grid-column: 1 / -1;
1392
+ display: flex;
1393
+ align-items: center;
1394
+ justify-content: space-between;
1395
+ gap: 12px;
1396
+ margin: 0;
1397
+ margin-inline: -10px -6px;
1398
+ padding: 9px 6px 3px;
1399
+ padding-inline: 10px 6px;
1400
+ border: 0;
1401
+ border-block-start: 1px solid var(--gallerist-hairline);
1402
+ border-radius: 0 0 5px 5px;
1403
+ background: transparent;
1404
+ color: var(--gallerist-fg-muted);
1405
+ font: inherit;
1406
+ text-align: start;
1407
+ cursor: pointer;
1408
+ }
1409
+ .gallerist-view-foot:hover {
1410
+ color: var(--gallerist-fg);
1411
+ }
1412
+ /* a key, as the shortcut list draws them */
1413
+ .gallerist-view-foot kbd,
1414
+ .gallerist-shortcuts kbd {
1415
+ display: inline-grid;
1416
+ place-items: center;
1417
+ box-sizing: border-box;
1418
+ min-width: 22px;
1419
+ height: 22px;
1420
+ padding: 0 6px;
1421
+ border: 1px solid var(--gallerist-hairline);
1422
+ border-bottom-width: 2px;
1423
+ border-radius: 5px;
1424
+ background: var(--gallerist-surface);
1425
+ color: var(--gallerist-fg);
1426
+ font: 500 11.5px / 1 var(--gallerist-mono);
1427
+ }
1428
+ /* its button reads as held while the popover is open */
938
1429
  .gallerist-bar button[aria-expanded="true"] {
939
1430
  background: var(--gallerist-tool-hover-bg);
940
1431
  }
1432
+ /* a finger gets taller segments, and no key to press */
941
1433
  @media (pointer: coarse) {
942
1434
  .gallerist-view-item {
943
- min-height: var(--gallerist-target);
1435
+ height: 36px;
1436
+ }
1437
+ .gallerist-view-foot kbd {
1438
+ display: none;
1439
+ }
1440
+ }
1441
+ /* forced colours drop the checked segment's raised surface and shadow: it takes the system's
1442
+ selection colours, and a focus ring the text colour, so focus and the choice still differ */
1443
+ @media (forced-colors: active) {
1444
+ .gallerist-view-item[aria-checked="true"] {
1445
+ forced-color-adjust: none;
1446
+ background: Highlight;
1447
+ color: HighlightText;
1448
+ }
1449
+ .gallerist-view-item[aria-checked="true"] .gallerist-view-icon {
1450
+ color: inherit;
1451
+ }
1452
+ :is(
1453
+ .gallerist-view-item,
1454
+ .gallerist-view-foot,
1455
+ .gallerist-shortcuts-close,
1456
+ .gallerist-shortcuts-body
1457
+ ):focus-visible {
1458
+ outline-color: CanvasText;
1459
+ }
1460
+ }
1461
+
1462
+ /* ── the shortcut list (plugin-shortcuts): a modal dialog over the viewer ────────── */
1463
+ /* The plugin puts a scrim over the whole viewer (the rest of it inert) and the dialog in its middle:
1464
+ a header (the title, Esc to close), then a column per section, the moves widest. On a narrow
1465
+ screen it is a sheet from the bottom edge, one column. */
1466
+ .gallerist-shortcuts-scrim {
1467
+ position: absolute;
1468
+ inset: 0;
1469
+ z-index: 20;
1470
+ /* one cell the scrim's size, so the dialog's max-height holds and its list scrolls */
1471
+ display: grid;
1472
+ grid-template: minmax(0, 1fr) / minmax(0, 1fr);
1473
+ place-items: center;
1474
+ padding: 16px;
1475
+ background: var(--gallerist-scrim);
1476
+ animation: gallerist-fade var(--gallerist-dur-exit) var(--gallerist-ease-out);
1477
+ }
1478
+ .gallerist-shortcuts {
1479
+ box-sizing: border-box;
1480
+ display: flex;
1481
+ flex-direction: column;
1482
+ width: min(720px, 100%);
1483
+ max-height: 100%;
1484
+ border: 1px solid var(--gallerist-hairline);
1485
+ border-radius: calc(var(--gallerist-radius) + 5px);
1486
+ background: var(--gallerist-popover-bg);
1487
+ backdrop-filter: var(--gallerist-blur);
1488
+ box-shadow: var(--gallerist-popover-shadow);
1489
+ color: var(--gallerist-fg);
1490
+ font: 400 13px / 1.35 var(--gallerist-font);
1491
+ }
1492
+ .gallerist-shortcuts:focus {
1493
+ outline: none; /* focus starts on the dialog, so a screen reader reads it whole; the ring is the close button's */
1494
+ }
1495
+ .gallerist-shortcuts-head {
1496
+ display: flex;
1497
+ align-items: center;
1498
+ gap: 10px;
1499
+ padding: 12px;
1500
+ padding-inline-start: 20px;
1501
+ border-block-end: 1px solid var(--gallerist-hairline);
1502
+ }
1503
+ .gallerist-shortcuts-head .gallerist-icon {
1504
+ flex: none;
1505
+ width: 17px;
1506
+ height: 17px;
1507
+ }
1508
+ .gallerist-shortcuts-head h2 {
1509
+ margin: 0;
1510
+ font-size: 14px;
1511
+ font-weight: 600;
1512
+ }
1513
+ .gallerist-shortcuts-close {
1514
+ display: inline-flex;
1515
+ align-items: center;
1516
+ gap: 8px;
1517
+ min-height: 32px;
1518
+ margin-inline-start: auto;
1519
+ padding: 0 8px;
1520
+ border: 0;
1521
+ border-radius: var(--gallerist-control-radius, 6px);
1522
+ background: transparent;
1523
+ color: var(--gallerist-fg-muted);
1524
+ font: inherit;
1525
+ font-size: 12.5px;
1526
+ cursor: pointer;
1527
+ }
1528
+ .gallerist-shortcuts-close:hover {
1529
+ background: var(--gallerist-tool-hover-bg);
1530
+ color: var(--gallerist-fg);
1531
+ }
1532
+ .gallerist-shortcuts-close:focus {
1533
+ outline: none;
1534
+ }
1535
+ .gallerist-shortcuts-close:focus-visible {
1536
+ outline: 2px solid var(--gallerist-focus);
1537
+ outline-offset: 1px;
1538
+ }
1539
+ .gallerist-shortcuts-body {
1540
+ display: flex;
1541
+ min-height: 0;
1542
+ flex-wrap: wrap;
1543
+ gap: 4px 28px;
1544
+ overflow-y: auto;
1545
+ padding: 16px 20px 18px;
1546
+ }
1547
+ /* the list takes focus (Tab) so the keys can scroll it when the viewer is short */
1548
+ .gallerist-shortcuts-body:focus {
1549
+ outline: none;
1550
+ }
1551
+ .gallerist-shortcuts-body:focus-visible {
1552
+ outline: 2px solid var(--gallerist-focus);
1553
+ outline-offset: -2px;
1554
+ }
1555
+ .gallerist-shortcuts-body section {
1556
+ flex: 1 1 150px;
1557
+ min-width: 0;
1558
+ }
1559
+ .gallerist-shortcuts-body section:first-child {
1560
+ flex: 1.7 1 250px;
1561
+ }
1562
+ .gallerist-shortcuts h3 {
1563
+ margin: 0 0 6px;
1564
+ color: var(--gallerist-fg-muted);
1565
+ font-size: 12px;
1566
+ font-weight: 500;
1567
+ }
1568
+ .gallerist-shortcuts dl {
1569
+ margin: 0;
1570
+ }
1571
+ .gallerist-shortcuts-row {
1572
+ display: flex;
1573
+ align-items: center;
1574
+ justify-content: space-between;
1575
+ gap: 12px;
1576
+ min-height: 34px;
1577
+ }
1578
+ .gallerist-shortcuts dd {
1579
+ display: flex;
1580
+ flex: none;
1581
+ gap: 4px;
1582
+ margin: 0;
1583
+ color: var(--gallerist-fg-muted);
1584
+ }
1585
+ .gallerist-shortcuts-note {
1586
+ margin: 0;
1587
+ padding: 11px 20px;
1588
+ border-block-start: 1px solid var(--gallerist-hairline);
1589
+ color: var(--gallerist-fg-muted);
1590
+ font-size: 12.5px;
1591
+ }
1592
+ /* the gestures: one list, a hairline between rows */
1593
+ .gallerist-shortcuts[data-gallerist-list="gestures"] .gallerist-shortcuts-body {
1594
+ padding-block: 4px;
1595
+ }
1596
+ .gallerist-shortcuts[data-gallerist-list="gestures"] .gallerist-shortcuts-row {
1597
+ min-height: 42px;
1598
+ }
1599
+ .gallerist-shortcuts[data-gallerist-list="gestures"]
1600
+ .gallerist-shortcuts-row
1601
+ + .gallerist-shortcuts-row {
1602
+ border-block-start: 1px solid var(--gallerist-hairline);
1603
+ }
1604
+ @media (max-width: 600px) {
1605
+ .gallerist-shortcuts-scrim {
1606
+ place-items: end stretch;
1607
+ padding: 16px 0 0;
1608
+ }
1609
+ .gallerist-shortcuts {
1610
+ width: 100%;
1611
+ border-width: 1px 0 0;
1612
+ border-radius: 14px 14px 0 0;
1613
+ }
1614
+ .gallerist-shortcuts-body {
1615
+ flex-direction: column;
1616
+ gap: 14px;
1617
+ padding-inline: 16px;
1618
+ }
1619
+ .gallerist-shortcuts-body section,
1620
+ .gallerist-shortcuts-body section:first-child {
1621
+ flex: none;
1622
+ }
1623
+ .gallerist-shortcuts-head {
1624
+ padding-inline-start: 16px;
1625
+ }
1626
+ .gallerist-shortcuts-note {
1627
+ padding: 12px 16px 20px;
1628
+ }
1629
+ }
1630
+ @media (prefers-reduced-motion: reduce) {
1631
+ .gallerist-shortcuts-scrim {
1632
+ animation: none;
944
1633
  }
945
1634
  }
946
1635
 
@@ -1418,9 +2107,17 @@
1418
2107
  display: flex;
1419
2108
  flex-direction: column;
1420
2109
  }
1421
- .gallerist[data-gallerist-rail="collapsed"] .gallerist-thumbs-region {
2110
+ .gallerist[data-gallerist-rail="collapsed"] .gallerist-thumbs-region:not([data-gallerist-glide]) {
1422
2111
  display: none;
1423
2112
  }
2113
+ /* gliding open or shut (plugin-thumbnails animates its size, clipped): the strip keeps to the edge
2114
+ by its handle, so it slides out past the viewer's edge rather than squeezing */
2115
+ .gallerist-thumbs-region[data-gallerist-glide] {
2116
+ align-items: flex-start;
2117
+ }
2118
+ .gallerist-thumbs-aside[data-gallerist-glide] {
2119
+ justify-content: flex-start;
2120
+ }
1424
2121
  /* the pull-handle: a grip tab on the rail's edge — clearly part of the gallery */
1425
2122
  .gallerist-rail-handle {
1426
2123
  flex: 0 0 auto;
@@ -1462,7 +2159,7 @@
1462
2159
  .gallerist-rail-toggle .gallerist-icon {
1463
2160
  width: 16px;
1464
2161
  height: 16px;
1465
- transition: transform var(--gallerist-dur-gentle, 280ms) var(--gallerist-ease-out, ease);
2162
+ transition: transform var(--gallerist-dur-panel, 220ms) var(--gallerist-ease-out, ease);
1466
2163
  }
1467
2164
  /* expanded = chevron points down (pull down to hide); collapsed = points up (pull up to show) */
1468
2165
  .gallerist-rail-toggle[aria-pressed="true"] .gallerist-icon {
@@ -1653,9 +2350,19 @@
1653
2350
  min-height: 0;
1654
2351
  }
1655
2352
  .gallerist[data-gallerist-orientation="vertical"][data-gallerist-rail="collapsed"]
1656
- .gallerist-thumbs-region {
2353
+ .gallerist-thumbs-region:not([data-gallerist-glide]) {
1657
2354
  display: none;
1658
2355
  }
2356
+ /* a side rail slides out sideways: its strip keeps to the handle's side (the stage's) */
2357
+ .gallerist[data-gallerist-rail-pos="left"] .gallerist-thumbs-region[data-gallerist-glide],
2358
+ .gallerist[data-gallerist-dir="rtl"][data-gallerist-rail-pos="right"]
2359
+ .gallerist-thumbs-region[data-gallerist-glide] {
2360
+ align-items: flex-end;
2361
+ }
2362
+ .gallerist[data-gallerist-dir="rtl"][data-gallerist-rail-pos="left"]
2363
+ .gallerist-thumbs-region[data-gallerist-glide] {
2364
+ align-items: flex-start;
2365
+ }
1659
2366
  .gallerist[data-gallerist-orientation="vertical"] .gallerist-thumbs {
1660
2367
  flex: 1 1 auto;
1661
2368
  min-height: 0;
@@ -1729,7 +2436,8 @@
1729
2436
  .gallerist[data-gallerist-preset="immersive"] .gallerist-caption {
1730
2437
  pointer-events: none;
1731
2438
  }
1732
- .gallerist[data-gallerist-preset="immersive"] .gallerist-bar > * {
2439
+ /* (the tools' strip, a region, passes them through itself: it spans the bar's free space) */
2440
+ .gallerist[data-gallerist-preset="immersive"] .gallerist-bar > :not(.gallerist-region-toolbar) {
1733
2441
  pointer-events: auto;
1734
2442
  }
1735
2443
  .gallerist[data-gallerist-preset="immersive"] .gallerist-caption {
@@ -1948,6 +2656,10 @@
1948
2656
  padding-inline: max(8px, env(safe-area-inset-left, 0px))
1949
2657
  max(8px, env(safe-area-inset-right, 0px));
1950
2658
  }
2659
+ /* the hairline before Close keeps the middle of its room (the bar's gap is 4px less here) */
2660
+ .gallerist-bar .gallerist-close::before {
2661
+ inset-inline-start: calc(2px - var(--gallerist-close-rule));
2662
+ }
1951
2663
  .gallerist-title {
1952
2664
  font-size: 13px;
1953
2665
  }
@@ -2063,6 +2775,7 @@
2063
2775
  .gallerist-region-thumbnails:has(.gallerist-thumbs[data-display="index"])
2064
2776
  .gallerist-thumbs-region {
2065
2777
  align-items: stretch;
2778
+ border-inline: 0 none;
2066
2779
  }
2067
2780
  .gallerist[data-gallerist-orientation="vertical"]
2068
2781
  .gallerist-region-thumbnails:has(.gallerist-thumbs[data-display="index"])
@@ -2076,7 +2789,6 @@
2076
2789
  padding: 8px 12px;
2077
2790
  overflow-x: auto;
2078
2791
  overflow-y: hidden;
2079
- border-inline: 0 none;
2080
2792
  }
2081
2793
  .gallerist[data-gallerist-orientation="vertical"]
2082
2794
  .gallerist-thumbs[data-display="index"]
package/src/console.css CHANGED
@@ -23,6 +23,7 @@
23
23
  --gallerist-fg-muted: #a3a9b1;
24
24
  --gallerist-chrome-bg: #16181b; /* surface 1: bands, panels, arrows */
25
25
  --gallerist-hairline: #2a2e34;
26
+ --gallerist-divider: #464c54; /* 2.05:1 on the rail (the hairline is 1.30:1) */
26
27
  --gallerist-radius: 6px;
27
28
  --gallerist-toolbar-h: 56px;
28
29
  --gallerist-thumb-h: 76px;
@@ -62,6 +63,7 @@
62
63
  --gallerist-tool-border: 0 solid transparent;
63
64
  --gallerist-tool-fg: var(--gallerist-fg-muted);
64
65
  --gallerist-tool-hover-bg: #1e2125;
66
+ --gallerist-close-rule: 9px; /* a hairline before Close */
65
67
  --gallerist-arrow-size: var(--gallerist-target);
66
68
  --gallerist-arrow-bg: var(--gallerist-chrome-bg);
67
69
  --gallerist-arrow-border: 1px solid var(--gallerist-hairline);
@@ -106,6 +108,23 @@
106
108
  --gallerist-pressed-bg: #272b30;
107
109
  --gallerist-pressed-fg: var(--gallerist-accent);
108
110
  --gallerist-pressed-shadow: inset 0 -2px 0 var(--gallerist-accent);
111
+ /* popovers: one step above the bar; segments recessed, the checked one raised */
112
+ --gallerist-popover-bg: #1b1d21;
113
+ --gallerist-popover-shadow: 0 14px 36px rgb(0 0 0 / 0.55), 0 2px 6px rgb(0 0 0 / 0.35);
114
+ --gallerist-seg-track: #111215;
115
+ --gallerist-seg-on: #2b2f35;
116
+ --gallerist-seg-on-shadow: inset 0 1px 0 rgb(255 255 255 / 0.05), 0 1px 2px rgb(0 0 0 / 0.5);
117
+ }
118
+
119
+ /* a compact bar for a mouse or trackpad (the mockup): 36px tools, 18px glyphs (Close 20px), the
120
+ zoom tool one bordered group. A touch keeps 44px targets. */
121
+ @media (pointer: fine) {
122
+ .gallerist[data-gallerist-skin="console"] {
123
+ --gallerist-tool-size: 36px;
124
+ --gallerist-tool-icon: 18px;
125
+ --gallerist-close-icon: calc(var(--gallerist-tool-icon) + 2px); /* 20px: follows the glyphs */
126
+ --gallerist-zoom-group: 1;
127
+ }
109
128
  }
110
129
 
111
130
  /* accents */
@@ -131,6 +150,7 @@
131
150
  --gallerist-fg-muted: #4a5058;
132
151
  --gallerist-chrome-bg: #fff;
133
152
  --gallerist-hairline: #d3d6db;
153
+ --gallerist-divider: var(--gallerist-hairline);
134
154
  --gallerist-surface: #f4f5f6;
135
155
  --gallerist-cell-bg: #f4f5f6;
136
156
  --gallerist-panel: rgb(255 255 255 / 0.97);
@@ -149,6 +169,11 @@
149
169
  --gallerist-pressed-bg: #e3e5e8;
150
170
  --gallerist-accent: var(--gallerist-accent-light);
151
171
  --gallerist-accent-fg: var(--gallerist-accent-light-fg);
172
+ --gallerist-popover-bg: #fff;
173
+ --gallerist-popover-shadow: 0 14px 36px rgb(22 24 27 / 0.14), 0 2px 6px rgb(22 24 27 / 0.08);
174
+ --gallerist-seg-track: #eceef1;
175
+ --gallerist-seg-on: #fff;
176
+ --gallerist-seg-on-shadow: 0 1px 2px rgb(22 24 27 / 0.16), 0 0 0 1px rgb(22 24 27 / 0.06);
152
177
  }
153
178
 
154
179
  @media (prefers-color-scheme: light) {
@@ -160,6 +185,7 @@
160
185
  --gallerist-fg-muted: #4a5058;
161
186
  --gallerist-chrome-bg: #fff;
162
187
  --gallerist-hairline: #d3d6db;
188
+ --gallerist-divider: var(--gallerist-hairline);
163
189
  --gallerist-surface: #f4f5f6;
164
190
  --gallerist-cell-bg: #f4f5f6;
165
191
  --gallerist-panel: rgb(255 255 255 / 0.97);
@@ -178,6 +204,11 @@
178
204
  --gallerist-pressed-bg: #e3e5e8;
179
205
  --gallerist-accent: var(--gallerist-accent-light);
180
206
  --gallerist-accent-fg: var(--gallerist-accent-light-fg);
207
+ --gallerist-popover-bg: #fff;
208
+ --gallerist-popover-shadow: 0 14px 36px rgb(22 24 27 / 0.14), 0 2px 6px rgb(22 24 27 / 0.08);
209
+ --gallerist-seg-track: #eceef1;
210
+ --gallerist-seg-on: #fff;
211
+ --gallerist-seg-on-shadow: 0 1px 2px rgb(22 24 27 / 0.16), 0 0 0 1px rgb(22 24 27 / 0.06);
181
212
  }
182
213
  }
183
214
  }
package/src/editorial.css CHANGED
@@ -23,6 +23,7 @@
23
23
  --gallerist-fg-muted: #58544b;
24
24
  --gallerist-chrome-bg: #f3f0e9;
25
25
  --gallerist-hairline: #dad4c7;
26
+ --gallerist-divider: var(--gallerist-hairline); /* not Gallery's dark one */
26
27
  --gallerist-surface: #fbfaf6;
27
28
  --gallerist-cell-bg: #fbfaf6;
28
29
  --gallerist-panel: rgb(243 240 233 / 0.98);
@@ -139,6 +140,7 @@
139
140
  --gallerist-fg-muted: #aba597;
140
141
  --gallerist-chrome-bg: #191816;
141
142
  --gallerist-hairline: #36332e;
143
+ --gallerist-divider: #4d4840; /* 1.96:1 on the wall (the hairline is 1.41:1) */
142
144
  --gallerist-surface: #262421;
143
145
  --gallerist-cell-bg: #262421;
144
146
  --gallerist-panel: rgb(25 24 22 / 0.98);
@@ -168,6 +170,7 @@
168
170
  --gallerist-fg-muted: #aba597;
169
171
  --gallerist-chrome-bg: #191816;
170
172
  --gallerist-hairline: #36332e;
173
+ --gallerist-divider: #4d4840;
171
174
  --gallerist-surface: #262421;
172
175
  --gallerist-cell-bg: #262421;
173
176
  --gallerist-panel: rgb(25 24 22 / 0.98);
package/src/gallery.css CHANGED
@@ -22,6 +22,7 @@
22
22
  --gallerist-fg-muted: #b9b9b4;
23
23
  --gallerist-chrome-bg: rgb(24 24 26 / 0.6);
24
24
  --gallerist-hairline: rgb(255 255 255 / 0.12);
25
+ --gallerist-divider: rgb(255 255 255 / 0.22); /* 1.93:1 on the ground (the hairline is 1.34:1) */
25
26
  --gallerist-radius: 12px;
26
27
  --gallerist-font: "Instrument Sans", system-ui, -apple-system, sans-serif;
27
28
  --gallerist-mono: var(--gallerist-font); /* no monospace face: numerals are tabular sans */
@@ -121,6 +122,7 @@
121
122
  --gallerist-fg-muted: #55554f;
122
123
  --gallerist-chrome-bg: rgb(255 255 255 / 0.85);
123
124
  --gallerist-hairline: rgb(21 21 21 / 0.12);
125
+ --gallerist-divider: var(--gallerist-hairline);
124
126
  --gallerist-surface: #fff;
125
127
  --gallerist-cell-bg: #eceae4;
126
128
  --gallerist-panel: rgb(244 243 239 / 0.97);
@@ -148,6 +150,7 @@
148
150
  --gallerist-fg-muted: #55554f;
149
151
  --gallerist-chrome-bg: rgb(255 255 255 / 0.85);
150
152
  --gallerist-hairline: rgb(21 21 21 / 0.12);
153
+ --gallerist-divider: var(--gallerist-hairline);
151
154
  --gallerist-surface: #fff;
152
155
  --gallerist-cell-bg: #eceae4;
153
156
  --gallerist-panel: rgb(244 243 239 / 0.97);