@gallerist/theme-default 0.4.0 → 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 +14 -0
- package/package.json +1 -1
- package/src/base.css +79 -3
- package/src/console.css +12 -0
package/README.md
CHANGED
|
@@ -41,6 +41,20 @@ screen; an inline viewer keeps it. Keep them with `--gallerist-phone-zoom: flex`
|
|
|
41
41
|
shows − and + only). A bar whose only tools are these two (and `controls: false`) still shows on a
|
|
42
42
|
phone, empty: leave the plugins out there, or keep the tools with the tokens.
|
|
43
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
|
+
|
|
44
58
|
The theme follows `forced-colors: active` (Windows High Contrast): the View popover's chosen segment
|
|
45
59
|
takes the system's selection colours and the focus rings the text colour. The rail's
|
|
46
60
|
item clusters (`thumbnails({ cluster })`) use `--gallerist-cluster-inner` (2px) inside a cluster and
|
package/package.json
CHANGED
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 */
|
|
@@ -497,6 +507,9 @@
|
|
|
497
507
|
align-items: center;
|
|
498
508
|
padding: 8px 12px;
|
|
499
509
|
overflow-x: auto;
|
|
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);
|
|
500
513
|
scrollbar-width: none;
|
|
501
514
|
-webkit-user-select: none;
|
|
502
515
|
user-select: none;
|
|
@@ -509,6 +522,7 @@
|
|
|
509
522
|
}
|
|
510
523
|
.gallerist-thumbs[data-gallerist-scroll="y"] {
|
|
511
524
|
--_fade-to: to bottom;
|
|
525
|
+
scroll-padding: var(--gallerist-rail-fade) 0;
|
|
512
526
|
}
|
|
513
527
|
.gallerist[data-gallerist-dir="rtl"] .gallerist-thumbs[data-gallerist-scroll="x"] {
|
|
514
528
|
--_fade-to: to left;
|
|
@@ -981,7 +995,7 @@
|
|
|
981
995
|
.gallerist-thumb-group-head {
|
|
982
996
|
display: flex;
|
|
983
997
|
align-items: center;
|
|
984
|
-
gap:
|
|
998
|
+
gap: 12px; /* the label, then the meta (the mockup) */
|
|
985
999
|
min-height: 14px;
|
|
986
1000
|
}
|
|
987
1001
|
.gallerist-thumb-group-head[hidden] {
|
|
@@ -1119,6 +1133,8 @@
|
|
|
1119
1133
|
backdrop-filter: var(--gallerist-blur);
|
|
1120
1134
|
}
|
|
1121
1135
|
.gallerist-bar button {
|
|
1136
|
+
min-width: var(--gallerist-tool-size);
|
|
1137
|
+
min-height: var(--gallerist-tool-size);
|
|
1122
1138
|
border: var(--gallerist-tool-border);
|
|
1123
1139
|
background: var(--gallerist-tool-bg);
|
|
1124
1140
|
color: var(--gallerist-tool-fg);
|
|
@@ -1171,21 +1187,77 @@
|
|
|
1171
1187
|
display: block;
|
|
1172
1188
|
pointer-events: none;
|
|
1173
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
|
+
}
|
|
1174
1213
|
|
|
1175
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 */
|
|
1176
1217
|
.gallerist-zoom-tool {
|
|
1218
|
+
--_g: var(--gallerist-zoom-group);
|
|
1177
1219
|
display: flex;
|
|
1178
1220
|
align-items: center;
|
|
1179
|
-
gap: 2px;
|
|
1221
|
+
gap: calc(2px - 2px * var(--_g));
|
|
1222
|
+
border: calc(1px * var(--_g)) solid var(--gallerist-hairline);
|
|
1223
|
+
border-radius: var(--gallerist-radius);
|
|
1180
1224
|
}
|
|
1181
1225
|
.gallerist-zoom-tool[hidden] {
|
|
1182
1226
|
display: none;
|
|
1183
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
|
+
}
|
|
1184
1255
|
.gallerist-bar .gallerist-zoom-level {
|
|
1185
1256
|
min-width: 4.5em;
|
|
1186
1257
|
padding: 0 4px;
|
|
1187
|
-
font: 600 13px / 1 var(--gallerist-mono);
|
|
1258
|
+
font: 600 calc(13px - 1px * var(--_g)) / 1 var(--gallerist-mono);
|
|
1188
1259
|
font-variant-numeric: tabular-nums;
|
|
1260
|
+
border-inline: calc(1px * var(--_g)) solid var(--gallerist-hairline);
|
|
1189
1261
|
}
|
|
1190
1262
|
/* at fit there's nothing to reset: the percentage keeps its colour */
|
|
1191
1263
|
.gallerist-bar .gallerist-zoom-level[aria-disabled="true"] {
|
|
@@ -2584,6 +2656,10 @@
|
|
|
2584
2656
|
padding-inline: max(8px, env(safe-area-inset-left, 0px))
|
|
2585
2657
|
max(8px, env(safe-area-inset-right, 0px));
|
|
2586
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
|
+
}
|
|
2587
2663
|
.gallerist-title {
|
|
2588
2664
|
font-size: 13px;
|
|
2589
2665
|
}
|
package/src/console.css
CHANGED
|
@@ -63,6 +63,7 @@
|
|
|
63
63
|
--gallerist-tool-border: 0 solid transparent;
|
|
64
64
|
--gallerist-tool-fg: var(--gallerist-fg-muted);
|
|
65
65
|
--gallerist-tool-hover-bg: #1e2125;
|
|
66
|
+
--gallerist-close-rule: 9px; /* a hairline before Close */
|
|
66
67
|
--gallerist-arrow-size: var(--gallerist-target);
|
|
67
68
|
--gallerist-arrow-bg: var(--gallerist-chrome-bg);
|
|
68
69
|
--gallerist-arrow-border: 1px solid var(--gallerist-hairline);
|
|
@@ -115,6 +116,17 @@
|
|
|
115
116
|
--gallerist-seg-on-shadow: inset 0 1px 0 rgb(255 255 255 / 0.05), 0 1px 2px rgb(0 0 0 / 0.5);
|
|
116
117
|
}
|
|
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
|
+
}
|
|
128
|
+
}
|
|
129
|
+
|
|
118
130
|
/* accents */
|
|
119
131
|
.gallerist[data-gallerist-skin="console"][data-gallerist-accent="cyan"] {
|
|
120
132
|
--gallerist-accent-dark: #3cc8dc;
|