@gallerist/theme-default 0.0.0-stage → 0.3.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.
- package/LICENSE +21 -0
- package/README.md +39 -2
- package/package.json +55 -3
- package/src/base.css +2113 -0
- package/src/console.css +183 -0
- package/src/editorial.css +191 -0
- package/src/gallerist.css +11 -0
- package/src/gallery.css +169 -0
- package/src/grid.css +143 -0
- package/src/pins.css +252 -0
package/src/grid.css
ADDED
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* @gallerist/theme-default — grid.css: styles for @gallerist/plugin-grid, drawn from the skin's
|
|
3
|
+
* tokens. Included by gallerist.css.
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
/* ── grid (plugin-grid) ────────────────────────────────────────────────────── */
|
|
7
|
+
.gallerist-grid {
|
|
8
|
+
position: absolute;
|
|
9
|
+
inset: 0;
|
|
10
|
+
overflow-y: auto;
|
|
11
|
+
padding: 16px;
|
|
12
|
+
background: var(--gallerist-panel);
|
|
13
|
+
backdrop-filter: blur(8px);
|
|
14
|
+
}
|
|
15
|
+
.gallerist-grid-header {
|
|
16
|
+
position: sticky;
|
|
17
|
+
top: 0;
|
|
18
|
+
padding: 12px 4px 8px;
|
|
19
|
+
font: 500 14px var(--gallerist-font);
|
|
20
|
+
color: var(--gallerist-fg);
|
|
21
|
+
background: var(--gallerist-panel);
|
|
22
|
+
}
|
|
23
|
+
.gallerist-grid-cells {
|
|
24
|
+
display: grid;
|
|
25
|
+
grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
|
|
26
|
+
gap: 8px;
|
|
27
|
+
margin-bottom: 12px;
|
|
28
|
+
}
|
|
29
|
+
.gallerist-grid-cell {
|
|
30
|
+
aspect-ratio: 3 / 2;
|
|
31
|
+
padding: 0;
|
|
32
|
+
border: 2px solid transparent;
|
|
33
|
+
border-radius: var(--gallerist-thumb-radius);
|
|
34
|
+
overflow: hidden;
|
|
35
|
+
cursor: pointer;
|
|
36
|
+
background: var(--gallerist-cell-bg);
|
|
37
|
+
}
|
|
38
|
+
.gallerist-grid-cell[data-active] {
|
|
39
|
+
border-color: var(--gallerist-selection);
|
|
40
|
+
}
|
|
41
|
+
.gallerist-grid-img {
|
|
42
|
+
width: 100%;
|
|
43
|
+
height: 100%;
|
|
44
|
+
object-fit: cover;
|
|
45
|
+
display: block;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
/* ── overview (`layout: 'sections'`) ───────────────────────────────────────── */
|
|
49
|
+
.gallerist-grid[data-layout="sections"] {
|
|
50
|
+
padding: 24px clamp(16px, 4vw, 48px);
|
|
51
|
+
background: var(--gallerist-bg);
|
|
52
|
+
backdrop-filter: none;
|
|
53
|
+
}
|
|
54
|
+
.gallerist-grid-top {
|
|
55
|
+
display: flex;
|
|
56
|
+
flex-wrap: wrap;
|
|
57
|
+
align-items: center;
|
|
58
|
+
justify-content: space-between;
|
|
59
|
+
gap: 12px;
|
|
60
|
+
margin-bottom: 20px;
|
|
61
|
+
}
|
|
62
|
+
.gallerist-grid-title {
|
|
63
|
+
font: 600 28px / 1.2 var(--gallerist-font);
|
|
64
|
+
color: var(--gallerist-fg);
|
|
65
|
+
}
|
|
66
|
+
.gallerist-grid-start {
|
|
67
|
+
margin-inline-start: auto;
|
|
68
|
+
min-height: 48px;
|
|
69
|
+
padding: 0 24px;
|
|
70
|
+
border: 0;
|
|
71
|
+
border-radius: 999px;
|
|
72
|
+
font: 600 15px var(--gallerist-font);
|
|
73
|
+
color: var(--gallerist-accent-fg);
|
|
74
|
+
background: var(--gallerist-accent);
|
|
75
|
+
cursor: pointer;
|
|
76
|
+
}
|
|
77
|
+
.gallerist-grid-start:focus-visible {
|
|
78
|
+
outline: 2px solid var(--gallerist-focus);
|
|
79
|
+
outline-offset: 2px;
|
|
80
|
+
}
|
|
81
|
+
.gallerist-grid-sections {
|
|
82
|
+
display: grid;
|
|
83
|
+
grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr));
|
|
84
|
+
align-items: start;
|
|
85
|
+
gap: 24px;
|
|
86
|
+
}
|
|
87
|
+
.gallerist-grid-section {
|
|
88
|
+
padding: 12px;
|
|
89
|
+
border-radius: 20px;
|
|
90
|
+
background: var(--gallerist-surface);
|
|
91
|
+
box-shadow: 0 0 0 1px var(--gallerist-hairline);
|
|
92
|
+
}
|
|
93
|
+
.gallerist-grid-section-head {
|
|
94
|
+
display: flex;
|
|
95
|
+
align-items: center;
|
|
96
|
+
gap: 8px;
|
|
97
|
+
padding: 2px 4px 10px;
|
|
98
|
+
}
|
|
99
|
+
.gallerist-grid-section-name {
|
|
100
|
+
overflow: hidden;
|
|
101
|
+
text-overflow: ellipsis;
|
|
102
|
+
white-space: nowrap;
|
|
103
|
+
font: 600 16px var(--gallerist-font);
|
|
104
|
+
color: var(--gallerist-fg);
|
|
105
|
+
}
|
|
106
|
+
.gallerist-grid-section-count {
|
|
107
|
+
flex: none;
|
|
108
|
+
min-width: 24px;
|
|
109
|
+
padding: 2px 6px;
|
|
110
|
+
border-radius: 999px;
|
|
111
|
+
font: 500 12px var(--gallerist-font);
|
|
112
|
+
text-align: center;
|
|
113
|
+
color: var(--gallerist-fg-muted);
|
|
114
|
+
background: var(--gallerist-group-bg);
|
|
115
|
+
}
|
|
116
|
+
.gallerist-grid-section-sub {
|
|
117
|
+
flex: none;
|
|
118
|
+
margin-inline-start: auto;
|
|
119
|
+
font: 400 12px var(--gallerist-font);
|
|
120
|
+
color: var(--gallerist-fg-muted);
|
|
121
|
+
}
|
|
122
|
+
.gallerist-grid-section-cells {
|
|
123
|
+
display: grid;
|
|
124
|
+
grid-template-columns: repeat(4, minmax(0, 1fr));
|
|
125
|
+
gap: 8px;
|
|
126
|
+
}
|
|
127
|
+
.gallerist-grid-section-cells > .gallerist-grid-cell {
|
|
128
|
+
position: relative;
|
|
129
|
+
border-radius: 12px;
|
|
130
|
+
}
|
|
131
|
+
.gallerist-grid-section-cells > .gallerist-grid-cell:first-child {
|
|
132
|
+
grid-column: 1 / -1;
|
|
133
|
+
aspect-ratio: 5 / 3;
|
|
134
|
+
}
|
|
135
|
+
.gallerist-grid-more {
|
|
136
|
+
position: absolute;
|
|
137
|
+
inset: 0;
|
|
138
|
+
display: grid;
|
|
139
|
+
place-items: center;
|
|
140
|
+
font: 600 14px var(--gallerist-font);
|
|
141
|
+
color: var(--gallerist-fg);
|
|
142
|
+
background: var(--gallerist-scrim);
|
|
143
|
+
}
|
package/src/pins.css
ADDED
|
@@ -0,0 +1,252 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* @gallerist/theme-default — pins.css: styles for @gallerist/plugin-pins, drawn from the skin's
|
|
3
|
+
* tokens (--gallerist-pin-* and the shared surfaces). Included by gallerist.css.
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
/* ── pins (plugin-pins): points on the image that open a card ─────────────────────
|
|
7
|
+
The overlay host is counter-scaled, so a pin keeps its screen size under zoom. The marker is a
|
|
8
|
+
44px hit area around a smaller dot; the card opens beside it, placed by the plugin (left, top,
|
|
9
|
+
max-width, max-height) inside the stage's free room. */
|
|
10
|
+
.gallerist-pin {
|
|
11
|
+
position: relative;
|
|
12
|
+
}
|
|
13
|
+
.gallerist-pin[hidden] {
|
|
14
|
+
display: none;
|
|
15
|
+
}
|
|
16
|
+
.gallerist-pin-marker {
|
|
17
|
+
display: grid;
|
|
18
|
+
place-items: center;
|
|
19
|
+
width: var(--gallerist-target);
|
|
20
|
+
height: var(--gallerist-target);
|
|
21
|
+
padding: 0;
|
|
22
|
+
border: 0;
|
|
23
|
+
background: transparent;
|
|
24
|
+
cursor: pointer;
|
|
25
|
+
}
|
|
26
|
+
/* numbered (comment, feature): an accent disc with the number */
|
|
27
|
+
.gallerist-pin-dot {
|
|
28
|
+
display: grid;
|
|
29
|
+
place-items: center;
|
|
30
|
+
min-width: var(--gallerist-pin-size);
|
|
31
|
+
height: var(--gallerist-pin-size);
|
|
32
|
+
padding: 0 6px;
|
|
33
|
+
box-sizing: border-box;
|
|
34
|
+
border-radius: 999px;
|
|
35
|
+
background: var(--gallerist-pin-bg);
|
|
36
|
+
color: var(--gallerist-pin-fg);
|
|
37
|
+
font: 600 12px var(--gallerist-font);
|
|
38
|
+
font-variant-numeric: tabular-nums;
|
|
39
|
+
box-shadow: 0 0 0 2px var(--gallerist-pin-ring), 0 2px 8px rgb(0 0 0 / 0.35);
|
|
40
|
+
transition: transform var(--gallerist-dur-gentle) var(--gallerist-ease-pop);
|
|
41
|
+
}
|
|
42
|
+
.gallerist-pin[data-resolved] .gallerist-pin-dot {
|
|
43
|
+
background: var(--gallerist-pin-resolved-bg);
|
|
44
|
+
color: var(--gallerist-pin-resolved-fg);
|
|
45
|
+
}
|
|
46
|
+
/* tag: a frosted ring with a white centre (it sits on photos, so it doesn't follow the scheme) */
|
|
47
|
+
.gallerist-pin[data-presentation="tag"] .gallerist-pin-dot {
|
|
48
|
+
width: 30px;
|
|
49
|
+
min-width: 30px;
|
|
50
|
+
height: 30px;
|
|
51
|
+
padding: 0;
|
|
52
|
+
background: rgb(255 255 255 / 0.28);
|
|
53
|
+
box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.6), 0 2px 8px rgb(0 0 0 / 0.3);
|
|
54
|
+
backdrop-filter: blur(4px);
|
|
55
|
+
}
|
|
56
|
+
.gallerist-pin[data-presentation="tag"] .gallerist-pin-dot::after {
|
|
57
|
+
content: "";
|
|
58
|
+
width: 10px;
|
|
59
|
+
height: 10px;
|
|
60
|
+
border-radius: 50%;
|
|
61
|
+
background: #fff;
|
|
62
|
+
}
|
|
63
|
+
.gallerist-pin-marker:hover .gallerist-pin-dot,
|
|
64
|
+
.gallerist-pin[data-open] .gallerist-pin-dot {
|
|
65
|
+
transform: scale(1.12);
|
|
66
|
+
}
|
|
67
|
+
.gallerist-pin-marker:focus-visible {
|
|
68
|
+
outline: none;
|
|
69
|
+
}
|
|
70
|
+
/* the ring over the image, whatever its colours (technique C40): a band of --gallerist-focus-halo
|
|
71
|
+
(black) and a white band around the dot, then the focus colour (the outline). Black and white are
|
|
72
|
+
21:1 apart, so one of the two reaches 3:1 (at least 4.58:1) against any media under it, whatever
|
|
73
|
+
the skin, scheme or accent; the focus colour alone can match the image. 3px each, so at least 2
|
|
74
|
+
whole screen pixels of each stay solid wherever the pin lands between pixels. In forced colours the
|
|
75
|
+
box-shadow bands go and the outline stays, in a system colour. */
|
|
76
|
+
.gallerist-pin-marker:focus-visible .gallerist-pin-dot {
|
|
77
|
+
outline: 2px solid var(--gallerist-focus);
|
|
78
|
+
outline-offset: 6px;
|
|
79
|
+
box-shadow: 0 0 0 3px var(--gallerist-focus-halo), 0 0 0 6px #fff, 0 2px 8px rgb(0 0 0 / 0.35);
|
|
80
|
+
}
|
|
81
|
+
.gallerist-pin[data-presentation="tag"] .gallerist-pin-marker:focus-visible .gallerist-pin-dot {
|
|
82
|
+
box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.6), 0 0 0 3px var(--gallerist-focus-halo), 0 0 0
|
|
83
|
+
6px #fff, 0 2px 8px rgb(0 0 0 / 0.3);
|
|
84
|
+
}
|
|
85
|
+
.gallerist-pin-card {
|
|
86
|
+
position: absolute;
|
|
87
|
+
top: 0;
|
|
88
|
+
left: calc(100% + 4px); /* until the plugin places it */
|
|
89
|
+
z-index: 1;
|
|
90
|
+
/* block layout, so a host's contents lay out as on the page (inline siblings share a line, a
|
|
91
|
+
button keeps its width, margins collapse); the close button comes first and takes no room */
|
|
92
|
+
box-sizing: border-box; /* the plugin's max-width / max-height are the room in the stage, padding included */
|
|
93
|
+
width: max-content;
|
|
94
|
+
max-width: min(280px, 70vw);
|
|
95
|
+
padding: 12px;
|
|
96
|
+
padding-inline: 14px 32px; /* the close button's room */
|
|
97
|
+
/* room for × however little the contents are (it reaches 20px into the content box: 28 - 8), so
|
|
98
|
+
an empty card never scrolls: 1 + 12 + 20 + 12 + 1 (border, padding, ×). Shorter, × overflowed
|
|
99
|
+
it, and the fade's 12px flipped it back each frame (tabindex and fade flickered). */
|
|
100
|
+
min-height: 46px;
|
|
101
|
+
border: 1px solid var(--gallerist-hairline);
|
|
102
|
+
border-radius: var(--gallerist-radius);
|
|
103
|
+
background: var(--gallerist-pin-card-bg);
|
|
104
|
+
backdrop-filter: var(--gallerist-blur);
|
|
105
|
+
box-shadow: var(--gallerist-shadow);
|
|
106
|
+
color: var(--gallerist-fg);
|
|
107
|
+
font: 400 13px / 1.4 var(--gallerist-font);
|
|
108
|
+
text-align: start;
|
|
109
|
+
cursor: auto;
|
|
110
|
+
overflow: auto; /* a card taller than the room scrolls */
|
|
111
|
+
overscroll-behavior: contain;
|
|
112
|
+
/* a scroll container: the stage's touch-action: none stops at it, so a touch in the card would
|
|
113
|
+
pan or pinch-zoom the page. None here (the card's own controls still take taps) ... */
|
|
114
|
+
touch-action: none;
|
|
115
|
+
}
|
|
116
|
+
/* ... and a vertical pan while it scrolls (the plugin puts it in the tab order then) */
|
|
117
|
+
.gallerist-pin-card[tabindex="0"] {
|
|
118
|
+
touch-action: pan-y;
|
|
119
|
+
scroll-padding-block-end: 24px; /* a control focused near the bottom clears the fade below */
|
|
120
|
+
}
|
|
121
|
+
/* a scrolling card says there's more below (a touch screen shows no scrollbar): its contents fade
|
|
122
|
+
out at its bottom edge. The fade sticks there as the card scrolls and, at the end, rests in the
|
|
123
|
+
room below the last control, where it covers nothing; it never takes a tap. */
|
|
124
|
+
.gallerist-pin-card[tabindex="0"]::after {
|
|
125
|
+
content: "";
|
|
126
|
+
display: block;
|
|
127
|
+
position: sticky;
|
|
128
|
+
bottom: -12px; /* the card's edge: sticky insets count from its content box */
|
|
129
|
+
z-index: 1; /* over host contents that are positioned */
|
|
130
|
+
height: 24px;
|
|
131
|
+
margin-block: 0 -12px; /* below the contents: 12px of its own and the card's 12px padding */
|
|
132
|
+
margin-inline: -14px -32px; /* the card's full width */
|
|
133
|
+
background: linear-gradient(transparent, var(--gallerist-pin-card-bg));
|
|
134
|
+
pointer-events: none;
|
|
135
|
+
}
|
|
136
|
+
/* forced colours: no fade (the gradient would be a solid block of the system background) */
|
|
137
|
+
@media (forced-colors: active) {
|
|
138
|
+
.gallerist-pin-card[tabindex="0"]::after {
|
|
139
|
+
display: none;
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
/* a host's field is a scroll container of its own, which the card's touch-action doesn't reach
|
|
143
|
+
into: a pinch starting on it would zoom the page. A vertical pan scrolls it; taps, the caret and
|
|
144
|
+
text selection are unaffected. */
|
|
145
|
+
.gallerist-pin-card :is(textarea, select) {
|
|
146
|
+
touch-action: pan-y;
|
|
147
|
+
}
|
|
148
|
+
.gallerist-pin-card[hidden] {
|
|
149
|
+
display: none;
|
|
150
|
+
}
|
|
151
|
+
.gallerist-pin-head {
|
|
152
|
+
display: flex;
|
|
153
|
+
flex-wrap: wrap;
|
|
154
|
+
align-items: baseline;
|
|
155
|
+
gap: 4px 8px;
|
|
156
|
+
}
|
|
157
|
+
.gallerist-pin-title {
|
|
158
|
+
font-weight: 600;
|
|
159
|
+
}
|
|
160
|
+
.gallerist-pin-meta {
|
|
161
|
+
color: var(--gallerist-fg-muted);
|
|
162
|
+
font-size: 12px;
|
|
163
|
+
}
|
|
164
|
+
.gallerist-pin-body {
|
|
165
|
+
/* a <p>: reset what host pages commonly style on paragraphs */
|
|
166
|
+
margin: 4px 0 0;
|
|
167
|
+
padding: 0;
|
|
168
|
+
max-width: none;
|
|
169
|
+
color: inherit;
|
|
170
|
+
font: inherit;
|
|
171
|
+
}
|
|
172
|
+
.gallerist-pin-replies > li {
|
|
173
|
+
margin: 0;
|
|
174
|
+
padding: 0;
|
|
175
|
+
}
|
|
176
|
+
.gallerist-pin-badge {
|
|
177
|
+
padding: 1px 6px;
|
|
178
|
+
border-radius: 999px;
|
|
179
|
+
background: var(--gallerist-pin-resolved-bg);
|
|
180
|
+
color: var(--gallerist-pin-resolved-fg);
|
|
181
|
+
font-size: 11px;
|
|
182
|
+
font-weight: 600;
|
|
183
|
+
}
|
|
184
|
+
.gallerist-pin-replies {
|
|
185
|
+
margin: 10px 0 0;
|
|
186
|
+
padding: 10px 0 0;
|
|
187
|
+
border-top: 1px solid var(--gallerist-hairline);
|
|
188
|
+
list-style: none;
|
|
189
|
+
display: grid;
|
|
190
|
+
gap: 8px;
|
|
191
|
+
}
|
|
192
|
+
.gallerist-pin-link {
|
|
193
|
+
display: inline-block;
|
|
194
|
+
margin-top: 8px;
|
|
195
|
+
color: var(--gallerist-fg);
|
|
196
|
+
font-weight: 600;
|
|
197
|
+
text-decoration: underline;
|
|
198
|
+
text-underline-offset: 3px;
|
|
199
|
+
}
|
|
200
|
+
.gallerist-pin-link:focus-visible,
|
|
201
|
+
.gallerist-pin-close:focus-visible,
|
|
202
|
+
.gallerist-pin-card:focus-visible {
|
|
203
|
+
outline: 2px solid var(--gallerist-focus);
|
|
204
|
+
outline-offset: 2px;
|
|
205
|
+
}
|
|
206
|
+
/* the card's ring falls outside it, on the image: banded like the pin's */
|
|
207
|
+
.gallerist-pin-card:focus-visible {
|
|
208
|
+
outline-offset: 6px; /* 8px out in all: the plugin keeps the card 8px inside the stage */
|
|
209
|
+
box-shadow: 0 0 0 3px var(--gallerist-focus-halo), 0 0 0 6px #fff, var(--gallerist-shadow);
|
|
210
|
+
}
|
|
211
|
+
.gallerist-pin-close {
|
|
212
|
+
/* first in the card (in reading and tab order too), 4px from its top and inline-end corner, and
|
|
213
|
+
held there as it scrolls (sticky insets count from the card's content box, inside its 12px
|
|
214
|
+
padding). It takes no room: it fills the inline-end padding but its last 4px, and its block
|
|
215
|
+
margins cancel its height, so the contents start at the top and a host's first block keeps its
|
|
216
|
+
own top margin (a positive one collapses with the -20px: 20 - 20 + m). A negative one collapses
|
|
217
|
+
with it too, the more negative winning, so the block starts at min(0, 20 + m): -10px has no
|
|
218
|
+
effect, -30px lifts it 10px. It starts where the
|
|
219
|
+
content box ends: Chromium counts an in-flow box from its start at least, plus the end padding,
|
|
220
|
+
in what scrolls, so one starting further in made every card scroll 4px sideways. */
|
|
221
|
+
position: sticky;
|
|
222
|
+
top: -8px;
|
|
223
|
+
z-index: 1; /* over host contents that are positioned */
|
|
224
|
+
margin-block: -8px -20px;
|
|
225
|
+
margin-inline: auto -28px;
|
|
226
|
+
display: grid;
|
|
227
|
+
place-items: center;
|
|
228
|
+
width: 28px;
|
|
229
|
+
height: 28px;
|
|
230
|
+
padding: 0;
|
|
231
|
+
border: 0;
|
|
232
|
+
border-radius: 999px;
|
|
233
|
+
background: var(--gallerist-pin-card-bg); /* contents scroll under it */
|
|
234
|
+
color: var(--gallerist-fg-muted);
|
|
235
|
+
cursor: pointer;
|
|
236
|
+
}
|
|
237
|
+
.gallerist-pin-close .gallerist-icon {
|
|
238
|
+
width: 16px;
|
|
239
|
+
height: 16px;
|
|
240
|
+
}
|
|
241
|
+
.gallerist-pins-tools {
|
|
242
|
+
display: flex;
|
|
243
|
+
gap: inherit;
|
|
244
|
+
}
|
|
245
|
+
/* placing a comment: a crosshair over the image */
|
|
246
|
+
.gallerist[data-gallerist-placing] .gallerist-content[data-gallerist-current] {
|
|
247
|
+
cursor: crosshair;
|
|
248
|
+
}
|
|
249
|
+
.gallerist[data-gallerist-placing] .gallerist-pin-add {
|
|
250
|
+
background: var(--gallerist-pressed-bg);
|
|
251
|
+
color: var(--gallerist-pressed-fg);
|
|
252
|
+
}
|