@blueshed/joined 0.2.2 → 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/.claude/skills/joined/SKILL.md +9 -1
- package/.claude/skills/joined/reference.md +267 -53
- package/.claude/skills/joined-door/SKILL.md +57 -0
- package/README.md +19 -50
- package/docs/design.md +76 -10
- package/docs/introduction.md +18 -18
- package/docs/light-and-shadow.svg +1 -1
- package/examples/README.md +20 -0
- package/examples/account/account.json +1 -0
- package/examples/account/derive.ts +41 -0
- package/examples/account/generated/elements.ts +52 -0
- package/examples/account/generated/rows.ts +22 -0
- package/examples/account/generated/rules.ts +32 -0
- package/examples/account/routes.ts +5 -0
- package/examples/app.css +2 -1
- package/examples/cafe/books.html +2 -2
- package/examples/cafe/cafe.css +9 -16
- package/examples/cafe/generated/books.rows.ts +22 -0
- package/examples/cafe/generated/books.rules.ts +3 -2
- package/examples/cafe/generated/kitchen.rows.ts +27 -0
- package/examples/cafe/generated/kitchen.rules.ts +11 -1
- package/examples/cafe/generated/menu.rows.ts +22 -0
- package/examples/cafe/generated/menu.rules.ts +3 -2
- package/examples/cafe/generated/order.rows.ts +27 -0
- package/examples/cafe/generated/order.rules.ts +11 -1
- package/examples/cafe/generated/staff.rows.ts +22 -0
- package/examples/cafe/generated/staff.rules.ts +6 -1
- package/examples/cafe/generated/supplies.queries.ts +4 -2
- package/examples/cafe/generated/supplies.rows.ts +22 -0
- package/examples/cafe/generated/supplies.rules.ts +12 -1
- package/examples/cafe/generated/till.queries.ts +2 -0
- package/examples/cafe/generated/till.rows.ts +27 -0
- package/examples/cafe/generated/till.rules.ts +11 -1
- package/examples/cafe/index.html +14 -15
- package/examples/cafe/kitchen.ts +1 -1
- package/examples/cafe/look.ts +30 -0
- package/examples/cafe/menu.html +10 -26
- package/examples/cafe/menu.ts +8 -80
- package/examples/cafe/order.html +6 -6
- package/examples/cafe/order.ts +5 -1
- package/examples/cafe/routes.ts +0 -1
- package/examples/cafe/stories.jsonl +3 -1
- package/examples/cafe/supplies.html +34 -34
- package/examples/cafe/supplies.ts +14 -11
- package/examples/cafe/till.ts +5 -1
- package/examples/chart/arches.ts +148 -0
- package/examples/chart/chart.css +6 -0
- package/examples/chart/chart.json +87 -0
- package/examples/chart/generated/elements.ts +105 -0
- package/examples/chart/generated/queries.ts +36 -0
- package/examples/chart/generated/rows.ts +27 -0
- package/examples/chart/generated/rules.ts +111 -0
- package/examples/chart/grid.ts +118 -0
- package/examples/chart/index.html +78 -0
- package/examples/chart/migrations/001-chart.ts +6 -0
- package/examples/chart/migrations/002-create-conditions.ts +6 -0
- package/examples/chart/page.ts +20 -0
- package/examples/chart/routes.ts +7 -0
- package/examples/chart/stories.jsonl +14 -0
- package/examples/chart/teeth.ts +57 -0
- package/examples/desk/generated/rows.ts +22 -0
- package/examples/desk/generated/rules.ts +34 -1
- package/examples/desk/index.html +9 -2
- package/examples/desk/routes.ts +0 -2
- package/examples/desk/stories.jsonl +3 -2
- package/examples/desk/thumbs.ts +2 -2
- package/examples/hello/generated/elements.ts +2 -2
- package/examples/hello/generated/rules.ts +3 -2
- package/examples/hello/hello.css +2 -4
- package/examples/hello/index.html +10 -3
- package/examples/hello/page.ts +4 -4
- package/examples/index.html +4 -5
- package/examples/notes/generated/elements.ts +112 -0
- package/examples/notes/generated/queries.ts +36 -0
- package/examples/notes/generated/rows.ts +27 -0
- package/examples/notes/generated/rules.ts +133 -0
- package/examples/notes/index.html +32 -0
- package/examples/notes/look.ts +41 -0
- package/examples/notes/migrations/001-notes.ts +7 -0
- package/examples/notes/notes.json +78 -0
- package/examples/notes/page.ts +21 -0
- package/examples/notes/routes.ts +6 -0
- package/examples/notes/stories.jsonl +21 -0
- package/examples/people/generated/rows.ts +22 -0
- package/examples/people/generated/rules.ts +11 -1
- package/examples/people/links.ts +2 -1
- package/examples/people/routes.ts +1 -3
- package/examples/people/stories.jsonl +1 -0
- package/examples/people/view.ts +5 -2
- package/examples/trip/generated/elements.ts +4 -2
- package/examples/trip/generated/queries.ts +12 -1
- package/examples/trip/generated/rows.ts +27 -0
- package/examples/trip/generated/rules.ts +56 -2
- package/examples/trip/index.html +58 -12
- package/examples/trip/line.css +186 -0
- package/examples/trip/line.ts +51 -40
- package/examples/trip/page.ts +65 -71
- package/examples/trip/routes.ts +9 -5
- package/examples/trip/stays.css +12 -12
- package/examples/trip/stays.ts +15 -10
- package/examples/trip/stories.jsonl +2 -0
- package/examples/trip/told.ts +3 -26
- package/examples/trip/trip.css +16 -0
- package/examples/trips/generated/rows.ts +22 -0
- package/examples/trips/generated/rules.ts +9 -1
- package/examples/trips/index.html +10 -10
- package/examples/trips/map.ts +3 -14
- package/examples/trips/new-trip.ts +14 -16
- package/examples/weeks/generated/elements.ts +1 -1
- package/examples/weeks/generated/queries.ts +11 -0
- package/examples/weeks/generated/rows.ts +22 -0
- package/examples/weeks/generated/rules.ts +11 -5
- package/examples/weeks/routes.ts +3 -2
- package/examples/weeks/stories.jsonl +1 -0
- package/examples/welcome.css +7 -5
- package/package.json +8 -2
- package/src/awesome.ts +103 -0
- package/src/board.css +75 -0
- package/src/board.ts +173 -0
- package/src/cli.ts +15 -2
- package/src/compile.ts +569 -35
- package/src/definitions.ts +53 -15
- package/src/draft.ts +38 -23
- package/src/drawer.ts +222 -0
- package/src/engine.ts +240 -166
- package/src/fields.ts +268 -0
- package/src/files.ts +6 -4
- package/src/ground.ts +110 -0
- package/src/icon-names.ts +15 -2
- package/src/kit.ts +51 -0
- package/src/link.ts +3 -3
- package/src/map.css +133 -0
- package/src/map.ts +200 -0
- package/src/mcp.ts +106 -22
- package/src/members/demo.ts +13 -12
- package/src/members/generated/rows.ts +22 -0
- package/src/members/generated/rules.ts +3 -2
- package/src/members/group.ts +65 -39
- package/src/members/keys.ts +93 -77
- package/src/members/panel.css +23 -17
- package/src/members/panel.ts +49 -35
- package/src/migrate.ts +120 -104
- package/src/month.css +125 -0
- package/src/month.ts +179 -0
- package/src/page.css +8 -0
- package/src/page.ts +7 -4
- package/src/parts.css +462 -170
- package/src/parts.ts +209 -26
- package/src/plane.css +56 -0
- package/src/plane.ts +151 -0
- package/src/postgres-server.ts +60 -0
- package/src/reading.css +77 -0
- package/src/reading.ts +238 -0
- package/src/rows.css +308 -0
- package/src/rows.ts +780 -0
- package/src/search.css +80 -0
- package/src/search.ts +130 -0
- package/src/server.ts +205 -114
- package/src/settings.ts +9 -4
- package/src/sheet.ts +114 -0
- package/src/skill.ts +40 -0
- package/src/slots.css +94 -0
- package/src/slots.ts +213 -0
- package/src/specs.ts +38 -0
- package/src/starter.ts +5 -2
- package/src/store.ts +184 -143
- package/src/stories.ts +43 -11
- package/src/surface.ts +159 -0
- package/src/timeline.css +111 -0
- package/src/timeline.ts +226 -0
- package/src/toast.ts +21 -48
- package/src/together.ts +0 -7
- package/src/tokens.css +78 -1
- package/src/tokens.json +249 -0
- package/src/tool.ts +211 -0
- package/src/upkeep.ts +18 -20
- package/src/views.css +44 -0
- package/src/views.ts +94 -0
- package/src/week.css +151 -0
- package/src/week.ts +250 -0
- package/src/write.ts +202 -69
- package/starter/CLAUDE.md +3 -3
- package/starter/bunfig +4 -0
- package/starter/prettierignore +4 -0
- package/starter/tests/hello.test.ts +2 -0
- package/docs/learning.md +0 -76
- package/examples/cafe/trust.ts +0 -20
- package/examples/desk/trust.ts +0 -24
- package/examples/people/trust.ts +0 -14
- package/examples/trip/answer-rows.ts +0 -70
- package/examples/trip/bar.ts +0 -89
- package/examples/trip/calendar-map.css +0 -711
- package/examples/trip/calendar-map.ts +0 -249
- package/examples/trip/drags.ts +0 -143
- package/examples/trip/drawer.ts +0 -250
- package/examples/trip/event-form.ts +0 -200
- package/examples/trip/holding.ts +0 -61
- package/examples/trip/map.ts +0 -234
- package/examples/trip/month.ts +0 -87
- package/examples/trip/other-weeks.ts +0 -67
- package/examples/trip/peek.ts +0 -71
- package/examples/trip/people-chips.ts +0 -74
- package/examples/trip/shell.ts +0 -39
- package/examples/trip/trust.ts +0 -51
- package/examples/trip/week.ts +0 -237
- package/examples/trip/writes.ts +0 -91
- package/examples/trip/zones.ts +0 -16
- package/examples/weeks/derive.ts +0 -23
- package/src/scrim.ts +0 -81
package/src/parts.css
CHANGED
|
@@ -6,29 +6,32 @@
|
|
|
6
6
|
|
|
7
7
|
.act a button with words, its icon before them: 13px, 32px tall (44px under a finger)
|
|
8
8
|
.ink the one that makes or keeps (Add, Save)
|
|
9
|
-
.danger the one that takes away: its words red; in a
|
|
9
|
+
.danger the one that takes away: its words red; in a modal, the answer, filled
|
|
10
10
|
.quiet a way out, its words alone (Sign out)
|
|
11
11
|
.icon-only a harmless action, its icon alone, its words its label (src/icons.ts)
|
|
12
12
|
.small a lesser tool among words, its words small
|
|
13
|
-
.j-tabs one of a few, side by side
|
|
14
13
|
.j-choices a list to pick one from, each a row
|
|
15
14
|
.j-face a person: their initial in their hue; empty, their dot
|
|
16
15
|
.j-chips people as chips, a face and a name each; a button one toggles (.j-chip, one shown)
|
|
17
16
|
.j-file a file field: its picture or its PDF's link, a way to choose one, and to take it off
|
|
17
|
+
.j-open a row (Row): the button that opens it, all of the row but its other buttons, its words and the
|
|
18
|
+
mark that says it opens; what holds it is the row, a hairline under it, marked while it's open
|
|
19
|
+
.j-tick a tick on a row: Web Awesome's wa-checkbox, a finger wide
|
|
20
|
+
.j-mention a thing named where it isn't its own place: a small tool that peeks at it
|
|
21
|
+
.j-peek a peek (Peek): a wa-popover, a little more of a thing, by what was tapped, read not written, with
|
|
22
|
+
the way to open it whole. It dims nothing
|
|
18
23
|
a field every input and select (a box to tick aside), as tall as a tool beside it, its words 16px
|
|
19
24
|
(or a phone zooms in); a textarea the same, taller. A field drawn otherwise (a name changed
|
|
20
25
|
in place) says so in its own sheet: these weigh nothing, so any rule there wins.
|
|
21
26
|
a label over its field: 13px, 600, in plain case
|
|
22
|
-
.drawer where a thing is changed: docked at the right, 320px, sliding in from it
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
a
|
|
29
|
-
|
|
30
|
-
behind by its one scrim (src/scrim.ts), which a modal dims by anywhere. Under reduced motion,
|
|
31
|
-
nothing moves.
|
|
27
|
+
.drawer where a thing is changed: docked at the right, 320px, sliding in from it (src/surface.ts).
|
|
28
|
+
Its head the thing's name (h2, 17px) and its ×; its deeds at its foot, removing first.
|
|
29
|
+
.sheet a popover that holds a list (the group, People): its head a title and its ×.
|
|
30
|
+
wa-drawer on a phone, a drawer and a sheet are Web Awesome's, risen from the foot: rounded at the top,
|
|
31
|
+
a grabber, the page dimmed behind.
|
|
32
|
+
wa-dialog a modal, new or delete, anywhere: its title (h2, 17px) and its ×, a line saying what follows,
|
|
33
|
+
its deeds. Asked first (.j-ask), roomier: its answers a finger tall, sharing its width, Never mind
|
|
34
|
+
first. Under reduced motion, nothing moves.
|
|
32
35
|
.j-foot a foot fixed at the screen's foot, run on past it, so nothing shows under it in Safari */
|
|
33
36
|
|
|
34
37
|
/* the layers, named in their order wherever joined's sheets are: an app's resets (button { font: inherit }) in
|
|
@@ -64,7 +67,7 @@
|
|
|
64
67
|
border-color: var(--danger);
|
|
65
68
|
color: var(--danger);
|
|
66
69
|
}
|
|
67
|
-
dialog .act.danger {
|
|
70
|
+
wa-dialog .act.danger {
|
|
68
71
|
background: var(--danger);
|
|
69
72
|
color: var(--danger-ink);
|
|
70
73
|
}
|
|
@@ -116,6 +119,10 @@
|
|
|
116
119
|
:is(.act, .icon-only) > svg.icon {
|
|
117
120
|
margin: 0;
|
|
118
121
|
}
|
|
122
|
+
/* one not offered isn't there: hidden wins over a tool's own display */
|
|
123
|
+
:is(.act, .icon-only)[hidden] {
|
|
124
|
+
display: none;
|
|
125
|
+
}
|
|
119
126
|
:is(.act, .icon-only):disabled {
|
|
120
127
|
opacity: 0.45;
|
|
121
128
|
cursor: default;
|
|
@@ -131,35 +138,6 @@
|
|
|
131
138
|
background: var(--card-hover);
|
|
132
139
|
}
|
|
133
140
|
|
|
134
|
-
/* .j-tabs: one of a few, side by side in a well, the chosen raised on card (the group's People and Agents) */
|
|
135
|
-
.j-tabs {
|
|
136
|
-
display: flex;
|
|
137
|
-
gap: 4px;
|
|
138
|
-
padding: 2px;
|
|
139
|
-
border: 1px solid var(--edge);
|
|
140
|
-
border-radius: 4px;
|
|
141
|
-
background: var(--paper);
|
|
142
|
-
}
|
|
143
|
-
.j-tabs > button {
|
|
144
|
-
flex: 1;
|
|
145
|
-
display: inline-flex;
|
|
146
|
-
align-items: center;
|
|
147
|
-
justify-content: center;
|
|
148
|
-
min-height: 28px;
|
|
149
|
-
border: 0;
|
|
150
|
-
border-radius: 3px;
|
|
151
|
-
background: none;
|
|
152
|
-
color: var(--muted);
|
|
153
|
-
font: var(--font-small);
|
|
154
|
-
cursor: pointer;
|
|
155
|
-
}
|
|
156
|
-
.j-tabs > [aria-selected="true"] {
|
|
157
|
-
background: var(--card);
|
|
158
|
-
color: var(--ink);
|
|
159
|
-
font-weight: 600;
|
|
160
|
-
box-shadow: 0 0 0 1px var(--edge);
|
|
161
|
-
}
|
|
162
|
-
|
|
163
141
|
/* .j-choices: a list to pick one from, each a row's words, tinted under the pointer (places found, a row's
|
|
164
142
|
menu); the one that takes away last, apart, in red */
|
|
165
143
|
.j-choices {
|
|
@@ -270,17 +248,22 @@
|
|
|
270
248
|
color: var(--ink);
|
|
271
249
|
font: var(--font-field);
|
|
272
250
|
}
|
|
251
|
+
/* a field said, not asked (a value once it's there, joined/kit's readonly): its words, with no box to type in */
|
|
252
|
+
:where(input:read-only:not([type="checkbox"], [type="radio"], [type="hidden"])) {
|
|
253
|
+
padding-inline: 0;
|
|
254
|
+
border-color: transparent;
|
|
255
|
+
background: none;
|
|
256
|
+
}
|
|
273
257
|
:where(textarea) {
|
|
274
258
|
min-height: 4.5rem;
|
|
275
259
|
padding: 8px 10px;
|
|
276
260
|
resize: vertical;
|
|
277
261
|
}
|
|
278
|
-
:where(form, dialog) label {
|
|
262
|
+
:where(form, wa-dialog) label {
|
|
279
263
|
display: grid;
|
|
280
264
|
gap: 4px;
|
|
281
265
|
font: var(--font-label);
|
|
282
266
|
}
|
|
283
|
-
|
|
284
267
|
/* a request's refusal, said beside what sent it (Said): its why in danger; nothing while there's none */
|
|
285
268
|
.said {
|
|
286
269
|
margin: 0;
|
|
@@ -331,8 +314,9 @@
|
|
|
331
314
|
opacity: 0;
|
|
332
315
|
}
|
|
333
316
|
|
|
334
|
-
/*
|
|
335
|
-
|
|
317
|
+
/* joined's surfaces, wider than a phone: the docked drawer and the sheet (src/surface.ts), each a card in a 1px edge,
|
|
318
|
+
4px corners, no shadow */
|
|
319
|
+
:where(.drawer, .sheet) {
|
|
336
320
|
box-sizing: border-box;
|
|
337
321
|
border: 1px solid var(--edge);
|
|
338
322
|
border-radius: 4px;
|
|
@@ -340,12 +324,12 @@
|
|
|
340
324
|
color: var(--ink);
|
|
341
325
|
font: var(--font-row);
|
|
342
326
|
}
|
|
343
|
-
:where(.drawer, .sheet
|
|
327
|
+
:where(.drawer, .sheet) h2 {
|
|
344
328
|
flex: 1;
|
|
345
329
|
margin: 0;
|
|
346
330
|
font: var(--font-title);
|
|
347
331
|
}
|
|
348
|
-
:where(.drawer, .sheet
|
|
332
|
+
:where(.drawer, .sheet) header {
|
|
349
333
|
display: flex;
|
|
350
334
|
align-items: center;
|
|
351
335
|
gap: 8px;
|
|
@@ -353,8 +337,9 @@
|
|
|
353
337
|
/* its head and its foot always show, what it is and what you may do: only what's between them scrolls (each to its
|
|
354
338
|
surface's edge, over what scrolls under it, a band of its card between; held past its padding, which a held thing
|
|
355
339
|
stops at, its foot past --pad-end, the padding at its foot where that's more) */
|
|
356
|
-
:where(.drawer, .sheet
|
|
357
|
-
:where(.drawer, .sheet
|
|
340
|
+
:where(.drawer, .sheet) > :is(header, h2):first-child,
|
|
341
|
+
:where(.drawer, .sheet) > :is(form, div) > header:first-child,
|
|
342
|
+
.drawer > div > form > header:first-child {
|
|
358
343
|
position: sticky;
|
|
359
344
|
top: calc(-1 * var(--pad));
|
|
360
345
|
z-index: 1;
|
|
@@ -362,7 +347,7 @@
|
|
|
362
347
|
padding: var(--pad) var(--pad) var(--space-8);
|
|
363
348
|
background: var(--card);
|
|
364
349
|
}
|
|
365
|
-
:where(.drawer, .sheet
|
|
350
|
+
:where(.drawer, .sheet) footer {
|
|
366
351
|
position: sticky;
|
|
367
352
|
bottom: calc(-1 * var(--pad-end, var(--pad)));
|
|
368
353
|
z-index: 1;
|
|
@@ -375,7 +360,7 @@
|
|
|
375
360
|
gap: 8px;
|
|
376
361
|
}
|
|
377
362
|
/* removing stands apart, first at the foot */
|
|
378
|
-
:where(.drawer, .sheet
|
|
363
|
+
:where(.drawer, .sheet) footer > .danger:first-child {
|
|
379
364
|
margin-right: auto;
|
|
380
365
|
}
|
|
381
366
|
.drawer {
|
|
@@ -391,30 +376,11 @@
|
|
|
391
376
|
}
|
|
392
377
|
/* its one column no wider than it, where a scrollbar takes room too (Windows, Linux): a field's least width would
|
|
393
378
|
push it sideways */
|
|
394
|
-
:where(.drawer, .sheet
|
|
379
|
+
:where(.drawer, .sheet) form {
|
|
395
380
|
display: grid;
|
|
396
381
|
grid-template-columns: minmax(0, 1fr);
|
|
397
382
|
gap: 12px;
|
|
398
383
|
}
|
|
399
|
-
dialog {
|
|
400
|
-
width: min(25rem, calc(100vw - 2rem));
|
|
401
|
-
--pad: 20px;
|
|
402
|
-
padding: var(--pad);
|
|
403
|
-
}
|
|
404
|
-
dialog[open] {
|
|
405
|
-
display: grid;
|
|
406
|
-
gap: 14px;
|
|
407
|
-
}
|
|
408
|
-
/* a modal dims what's behind it by its own ::backdrop only where src/scrim.ts doesn't watch (a shadow its display
|
|
409
|
-
gave the parts by hand, not by adopt()); where it does, the page's one scrim does, which fades in every browser */
|
|
410
|
-
dialog::backdrop {
|
|
411
|
-
background: var(--scrim);
|
|
412
|
-
}
|
|
413
|
-
dialog p {
|
|
414
|
-
margin: 0;
|
|
415
|
-
font: var(--font-small);
|
|
416
|
-
color: var(--muted);
|
|
417
|
-
}
|
|
418
384
|
.sheet {
|
|
419
385
|
width: min(22rem, calc(100vw - 2rem));
|
|
420
386
|
max-height: calc(100dvh - 2rem);
|
|
@@ -430,7 +396,423 @@
|
|
|
430
396
|
display: grid;
|
|
431
397
|
gap: 10px;
|
|
432
398
|
}
|
|
399
|
+
/* on a phone, a sheet an app pops itself (joined's own are Web Awesome's there, by Surface) rises from the foot:
|
|
400
|
+
the screen's width, rounded at the top */
|
|
401
|
+
@media (max-width: 40rem) {
|
|
402
|
+
.sheet {
|
|
403
|
+
inset: auto 0 0;
|
|
404
|
+
width: auto;
|
|
405
|
+
max-height: 88dvh;
|
|
406
|
+
margin: 0;
|
|
407
|
+
border: 0;
|
|
408
|
+
border-radius: var(--radius-sheet) var(--radius-sheet) 0 0;
|
|
409
|
+
padding-bottom: calc(var(--space-16) + env(safe-area-inset-bottom));
|
|
410
|
+
}
|
|
411
|
+
}
|
|
433
412
|
|
|
413
|
+
/* Web Awesome's surfaces (src/awesome.ts): a modal (wa-dialog) anywhere, and on a phone a drawer or a sheet
|
|
414
|
+
(wa-drawer, src/surface.ts), risen from the foot, rounded at its top, as tall as it needs; each its head its title
|
|
415
|
+
(h2) and its ×, its foot its deeds, removing apart, first; only what's between them scrolls. */
|
|
416
|
+
:where(wa-drawer, wa-dialog) {
|
|
417
|
+
--spacing: var(--space-14);
|
|
418
|
+
font: var(--font-row);
|
|
419
|
+
}
|
|
420
|
+
wa-drawer {
|
|
421
|
+
--size: var(--size-panel);
|
|
422
|
+
}
|
|
423
|
+
wa-drawer::part(dialog) {
|
|
424
|
+
border-left: 1px solid var(--edge);
|
|
425
|
+
}
|
|
426
|
+
wa-drawer[placement="bottom"] {
|
|
427
|
+
--size: auto;
|
|
428
|
+
}
|
|
429
|
+
wa-drawer[placement="bottom"]::part(dialog) {
|
|
430
|
+
max-height: calc(100dvh - var(--space-48));
|
|
431
|
+
border: 0;
|
|
432
|
+
border-radius: var(--radius-sheet) var(--radius-sheet) 0 0;
|
|
433
|
+
}
|
|
434
|
+
wa-dialog {
|
|
435
|
+
--width: var(--size-modal);
|
|
436
|
+
}
|
|
437
|
+
wa-dialog::part(dialog) {
|
|
438
|
+
border: 1px solid var(--edge);
|
|
439
|
+
}
|
|
440
|
+
wa-dialog p {
|
|
441
|
+
margin: 0;
|
|
442
|
+
font: var(--font-small);
|
|
443
|
+
color: var(--muted);
|
|
444
|
+
}
|
|
445
|
+
/* a surface of Web Awesome's without its own head (what it holds brings its own: a form's header, its footer): those
|
|
446
|
+
held at the edges of what scrolls, as joined's drawer's are, a band of its card between */
|
|
447
|
+
:is(wa-dialog, wa-drawer)[without-header] :is(form, div) > header:first-child {
|
|
448
|
+
position: sticky;
|
|
449
|
+
top: calc(-1 * var(--spacing));
|
|
450
|
+
z-index: 1;
|
|
451
|
+
margin: calc(-1 * var(--spacing)) calc(-1 * var(--spacing)) 0;
|
|
452
|
+
padding: var(--spacing) var(--spacing) var(--space-8);
|
|
453
|
+
background: var(--card);
|
|
454
|
+
}
|
|
455
|
+
/* the foot of a page's sheet, on a phone (src/surface.ts): its form or deeds held at the foot, as a sheet's are wider */
|
|
456
|
+
:is(wa-dialog, wa-drawer)[without-header] form > footer,
|
|
457
|
+
wa-drawer > .j-sheet-body > footer:last-child {
|
|
458
|
+
position: sticky;
|
|
459
|
+
bottom: calc(-1 * var(--spacing));
|
|
460
|
+
z-index: 1;
|
|
461
|
+
margin: 0 calc(-1 * var(--spacing)) calc(-1 * var(--spacing));
|
|
462
|
+
padding: var(--space-8) var(--spacing) var(--spacing);
|
|
463
|
+
background: var(--card);
|
|
464
|
+
}
|
|
465
|
+
wa-drawer > .j-sheet-body > footer:last-child {
|
|
466
|
+
display: flex;
|
|
467
|
+
flex-wrap: wrap;
|
|
468
|
+
justify-content: flex-end;
|
|
469
|
+
gap: var(--space-8);
|
|
470
|
+
}
|
|
471
|
+
/* what scrolls goes under a band of the head's own and over one of the foot's, never touching a title or a button */
|
|
472
|
+
:where(wa-drawer, wa-dialog)::part(header) {
|
|
473
|
+
padding-block-end: var(--space-8);
|
|
474
|
+
}
|
|
475
|
+
:where(wa-drawer, wa-dialog)::part(footer) {
|
|
476
|
+
padding-block-start: var(--space-8);
|
|
477
|
+
}
|
|
478
|
+
:where(wa-drawer, wa-dialog) h2 {
|
|
479
|
+
flex: 1;
|
|
480
|
+
margin: 0;
|
|
481
|
+
font: var(--font-title);
|
|
482
|
+
}
|
|
483
|
+
/* a modal with nothing to say past its question: no empty body between its head and foot */
|
|
484
|
+
wa-dialog:not(:has(> :not([slot])))::part(body) {
|
|
485
|
+
display: none;
|
|
486
|
+
}
|
|
487
|
+
/* asked first (askFirst, the group's): as Apple's alerts are, room around it, its question, a line saying what
|
|
488
|
+
follows in the ink's own size, and its two answers a finger tall, sharing its width, Never mind first, apart */
|
|
489
|
+
wa-dialog.j-ask {
|
|
490
|
+
--spacing: var(--space-24);
|
|
491
|
+
}
|
|
492
|
+
wa-dialog.j-ask::part(body) {
|
|
493
|
+
padding-block: 0 var(--space-16);
|
|
494
|
+
}
|
|
495
|
+
wa-dialog.j-ask > p {
|
|
496
|
+
font: var(--font-row);
|
|
497
|
+
}
|
|
498
|
+
wa-dialog.j-ask > p + * {
|
|
499
|
+
margin-top: var(--space-16);
|
|
500
|
+
}
|
|
501
|
+
wa-dialog.j-ask footer {
|
|
502
|
+
gap: var(--space-12);
|
|
503
|
+
}
|
|
504
|
+
wa-dialog.j-ask footer .act {
|
|
505
|
+
flex: 1 1 0;
|
|
506
|
+
min-height: var(--size-finger);
|
|
507
|
+
}
|
|
508
|
+
/* a head of its own (a form's header): its title, then its × at its end, on one line */
|
|
509
|
+
:where(wa-drawer, wa-dialog) :is(form, div) > header:first-child {
|
|
510
|
+
display: flex;
|
|
511
|
+
align-items: center;
|
|
512
|
+
gap: var(--space-8);
|
|
513
|
+
}
|
|
514
|
+
:where(wa-drawer, wa-dialog) footer {
|
|
515
|
+
display: flex;
|
|
516
|
+
flex-wrap: wrap;
|
|
517
|
+
justify-content: flex-end;
|
|
518
|
+
gap: var(--space-8);
|
|
519
|
+
width: 100%;
|
|
520
|
+
}
|
|
521
|
+
:where(wa-drawer, wa-dialog) footer > [variant="danger"]:first-child {
|
|
522
|
+
margin-right: auto;
|
|
523
|
+
}
|
|
524
|
+
:where(wa-drawer, wa-dialog) form {
|
|
525
|
+
display: grid;
|
|
526
|
+
grid-template-columns: minmax(0, 1fr);
|
|
527
|
+
gap: var(--space-12);
|
|
528
|
+
}
|
|
529
|
+
/* a phone's sheet has its grabber on its head */
|
|
530
|
+
wa-drawer[placement="bottom"]::part(header)::before {
|
|
531
|
+
content: "";
|
|
532
|
+
position: absolute;
|
|
533
|
+
top: var(--space-6);
|
|
534
|
+
left: 50%;
|
|
535
|
+
width: var(--space-32);
|
|
536
|
+
height: var(--space-4);
|
|
537
|
+
border-radius: var(--radius-pill);
|
|
538
|
+
background: var(--edge);
|
|
539
|
+
translate: -50% 0;
|
|
540
|
+
}
|
|
541
|
+
wa-drawer[placement="bottom"]::part(header) {
|
|
542
|
+
position: relative;
|
|
543
|
+
}
|
|
544
|
+
|
|
545
|
+
/* Web Awesome's fields: a label as joined's (13px, its weight), a field a control tall (32px), a finger tall on a
|
|
546
|
+
phone; a number written from its start; said, not changed (readonly), as its words alone */
|
|
547
|
+
:root {
|
|
548
|
+
--wa-form-control-height: var(--size-control);
|
|
549
|
+
--wa-form-control-padding-block: var(--space-6);
|
|
550
|
+
--wa-form-control-padding-inline: var(--space-10);
|
|
551
|
+
}
|
|
552
|
+
@media (max-width: 40rem) {
|
|
553
|
+
:root {
|
|
554
|
+
--wa-form-control-height: var(--size-finger);
|
|
555
|
+
--wa-form-control-padding-block: var(--space-12);
|
|
556
|
+
}
|
|
557
|
+
}
|
|
558
|
+
:where(wa-input, wa-number-input, wa-textarea, wa-select)::part(form-control-label) {
|
|
559
|
+
font: var(--font-label);
|
|
560
|
+
}
|
|
561
|
+
/* a field in a line of its own (a box to add by): its label its name for a screen reader alone */
|
|
562
|
+
:where(wa-input, wa-number-input, wa-textarea, wa-select).j-bare::part(form-control-label) {
|
|
563
|
+
position: absolute;
|
|
564
|
+
width: 1px;
|
|
565
|
+
height: 1px;
|
|
566
|
+
overflow: hidden;
|
|
567
|
+
clip-path: inset(50%);
|
|
568
|
+
}
|
|
569
|
+
wa-number-input::part(input) {
|
|
570
|
+
text-align: start;
|
|
571
|
+
}
|
|
572
|
+
wa-number-input::part(start),
|
|
573
|
+
wa-number-input::part(end) {
|
|
574
|
+
flex: none;
|
|
575
|
+
margin: 0;
|
|
576
|
+
}
|
|
577
|
+
:where(wa-input, wa-number-input, wa-textarea)[readonly]::part(base) {
|
|
578
|
+
border-color: transparent;
|
|
579
|
+
background: transparent;
|
|
580
|
+
}
|
|
581
|
+
:where(wa-input, wa-number-input, wa-textarea)[readonly]::part(input) {
|
|
582
|
+
padding-inline: 0;
|
|
583
|
+
}
|
|
584
|
+
|
|
585
|
+
/* a card (wa-card): what holds a part of a page, in a 1px edge, 4px corners, card's ground and no shadow; an app
|
|
586
|
+
sets its --spacing, and lays out what's in it */
|
|
587
|
+
wa-card {
|
|
588
|
+
--spacing: var(--space-12);
|
|
589
|
+
box-shadow: none;
|
|
590
|
+
}
|
|
591
|
+
/* (clipped to its corners, never a box that scrolls: what's held at the screen's foot in it still is) */
|
|
592
|
+
wa-card::part(body) {
|
|
593
|
+
overflow: clip;
|
|
594
|
+
border-radius: inherit;
|
|
595
|
+
}
|
|
596
|
+
/* a toast (src/toast.ts), as the group's notice is: as wide as its words, as the page allows less 1rem a side, at
|
|
597
|
+
its middle */
|
|
598
|
+
wa-toast {
|
|
599
|
+
--width: min(calc(var(--size-said) + 2 * var(--space-16)), 100%);
|
|
600
|
+
padding-inline: var(--space-16);
|
|
601
|
+
}
|
|
602
|
+
wa-toast-item {
|
|
603
|
+
align-self: center;
|
|
604
|
+
width: max-content;
|
|
605
|
+
max-width: 100%;
|
|
606
|
+
}
|
|
607
|
+
|
|
608
|
+
/* a row (Row, design.md "A row"): whatever holds a .j-open is one. All of it is the one target but its other
|
|
609
|
+
buttons, which do something else (a tick, a grip); a finger tall at least; a hairline between it and the next.
|
|
610
|
+
Under the pointer it says it opens, all its width; the one whose drawer is open ([aria-current] on its
|
|
611
|
+
.j-open) keeps that ground, and a stripe of accent at its left. Zero weight: an app's own rule for its item wins */
|
|
612
|
+
:where(:has(> .j-open)) {
|
|
613
|
+
position: relative;
|
|
614
|
+
display: flex;
|
|
615
|
+
align-items: stretch;
|
|
616
|
+
border-bottom: 1px solid var(--line);
|
|
617
|
+
}
|
|
618
|
+
:where(:has(> .j-open)):last-child {
|
|
619
|
+
border-bottom: 0;
|
|
620
|
+
}
|
|
621
|
+
:where(:has(> .j-open:is(:hover, [aria-current]):enabled)) {
|
|
622
|
+
background: var(--card-hover);
|
|
623
|
+
}
|
|
624
|
+
:where(:has(> .j-open[aria-current]))::before {
|
|
625
|
+
content: "";
|
|
626
|
+
position: absolute;
|
|
627
|
+
inset: 0 auto 0 0;
|
|
628
|
+
width: 3px;
|
|
629
|
+
background: var(--accent);
|
|
630
|
+
}
|
|
631
|
+
.j-open {
|
|
632
|
+
flex: 1;
|
|
633
|
+
box-sizing: border-box;
|
|
634
|
+
min-width: 0;
|
|
635
|
+
min-height: var(--size-finger);
|
|
636
|
+
display: flex;
|
|
637
|
+
align-items: center;
|
|
638
|
+
gap: var(--space-12);
|
|
639
|
+
padding: var(--space-10) var(--space-12) var(--space-10) var(--space-16);
|
|
640
|
+
border: 0;
|
|
641
|
+
background: none;
|
|
642
|
+
color: var(--ink);
|
|
643
|
+
font: var(--font-row);
|
|
644
|
+
text-align: left;
|
|
645
|
+
cursor: pointer;
|
|
646
|
+
}
|
|
647
|
+
/* after a tick, its words start where the tick's room ends */
|
|
648
|
+
.j-tick + .j-open {
|
|
649
|
+
padding-left: var(--space-4);
|
|
650
|
+
}
|
|
651
|
+
.j-open:focus-visible {
|
|
652
|
+
outline: 2px solid var(--accent);
|
|
653
|
+
outline-offset: -2px;
|
|
654
|
+
}
|
|
655
|
+
/* its words, and under them what more is said of it, one line, cut short */
|
|
656
|
+
.j-open > .j-words {
|
|
657
|
+
flex: 1;
|
|
658
|
+
min-width: 0;
|
|
659
|
+
display: grid;
|
|
660
|
+
gap: var(--space-4);
|
|
661
|
+
}
|
|
662
|
+
.j-open > .j-words > b {
|
|
663
|
+
font: inherit;
|
|
664
|
+
overflow-wrap: anywhere;
|
|
665
|
+
}
|
|
666
|
+
.j-open > .j-words > span {
|
|
667
|
+
overflow: hidden;
|
|
668
|
+
color: var(--muted);
|
|
669
|
+
font: var(--font-small);
|
|
670
|
+
text-overflow: ellipsis;
|
|
671
|
+
white-space: nowrap;
|
|
672
|
+
}
|
|
673
|
+
.j-open > .j-words > span:empty {
|
|
674
|
+
display: none;
|
|
675
|
+
}
|
|
676
|
+
/* the mark that it opens, at its end: faint, ink under the pointer and while it's open */
|
|
677
|
+
.j-open > svg.icon {
|
|
678
|
+
flex: none;
|
|
679
|
+
color: var(--edge);
|
|
680
|
+
}
|
|
681
|
+
.j-open:is(:hover, [aria-current]) > svg.icon {
|
|
682
|
+
color: var(--ink);
|
|
683
|
+
}
|
|
684
|
+
/* one this person may not open: its words alone, no mark, nothing to press */
|
|
685
|
+
.j-open:disabled {
|
|
686
|
+
color: var(--ink);
|
|
687
|
+
cursor: default;
|
|
688
|
+
}
|
|
689
|
+
.j-open:disabled > svg.icon {
|
|
690
|
+
display: none;
|
|
691
|
+
}
|
|
692
|
+
/* .j-tick: a tick on a row (a wa-checkbox), a finger wide, in line with a card's 16px edge; its words its name for
|
|
693
|
+
a screen reader alone. Its state is its own, never a colour of the row's */
|
|
694
|
+
.j-tick {
|
|
695
|
+
flex: none;
|
|
696
|
+
display: inline-flex;
|
|
697
|
+
align-items: center;
|
|
698
|
+
justify-content: center;
|
|
699
|
+
width: var(--size-finger);
|
|
700
|
+
height: var(--size-finger);
|
|
701
|
+
margin-left: var(--space-4);
|
|
702
|
+
}
|
|
703
|
+
.j-tick::part(label) {
|
|
704
|
+
position: absolute;
|
|
705
|
+
width: 1px;
|
|
706
|
+
height: 1px;
|
|
707
|
+
overflow: hidden;
|
|
708
|
+
clip-path: inset(50%);
|
|
709
|
+
}
|
|
710
|
+
|
|
711
|
+
/* .j-mention: a thing named away from its own place (design.md, "A peek"): a pill in the page's ground, its words
|
|
712
|
+
small; a tap peeks. In a row it stands under the row's words, in line with them */
|
|
713
|
+
.j-mention {
|
|
714
|
+
display: block;
|
|
715
|
+
box-sizing: border-box;
|
|
716
|
+
min-height: var(--space-24);
|
|
717
|
+
padding: 0 var(--space-10);
|
|
718
|
+
border: 1px solid var(--edge);
|
|
719
|
+
border-radius: var(--radius-pill);
|
|
720
|
+
background: var(--paper);
|
|
721
|
+
color: var(--ink);
|
|
722
|
+
font: var(--font-small);
|
|
723
|
+
cursor: pointer;
|
|
724
|
+
max-width: calc(100% - 2 * var(--space-16));
|
|
725
|
+
overflow: hidden;
|
|
726
|
+
text-overflow: ellipsis;
|
|
727
|
+
white-space: nowrap;
|
|
728
|
+
}
|
|
729
|
+
.j-mention:is(:hover, :focus-visible, [aria-expanded="true"]) {
|
|
730
|
+
border-color: var(--ink);
|
|
731
|
+
}
|
|
732
|
+
.j-mention[hidden] {
|
|
733
|
+
display: none;
|
|
734
|
+
}
|
|
735
|
+
/* a row that mentions something: its words keep their line, all its width, and the mention stands under them */
|
|
736
|
+
:where(:has(> .j-open)):has(> .j-mention) {
|
|
737
|
+
flex-wrap: wrap;
|
|
738
|
+
}
|
|
739
|
+
:has(> .j-mention) > .j-open {
|
|
740
|
+
flex-basis: 100%;
|
|
741
|
+
}
|
|
742
|
+
:has(> .j-mention) > .j-tick + .j-open {
|
|
743
|
+
flex-basis: calc(100% - var(--size-finger) - var(--space-4));
|
|
744
|
+
padding-bottom: var(--space-4);
|
|
745
|
+
}
|
|
746
|
+
.j-open ~ .j-mention {
|
|
747
|
+
margin: 0 var(--space-16) var(--space-10);
|
|
748
|
+
}
|
|
749
|
+
.j-tick ~ .j-open ~ .j-mention {
|
|
750
|
+
margin-left: calc(var(--size-finger) + var(--space-8));
|
|
751
|
+
}
|
|
752
|
+
/* .j-peek: a little more of a thing, where it was tapped: Web Awesome's wa-popover, by its mention (peek(),
|
|
753
|
+
src/parts.ts), no wider than a sheet. Its head the thing's name and its ×; then what's said of it; at its foot the
|
|
754
|
+
way to open it whole. A tap elsewhere or Escape takes it away, and the page isn't dimmed */
|
|
755
|
+
.j-peek {
|
|
756
|
+
--max-width: min(var(--size-sheet), calc(100vw - 2 * var(--gutter)));
|
|
757
|
+
--arrow-size: 0px;
|
|
758
|
+
}
|
|
759
|
+
.j-peek::part(body) {
|
|
760
|
+
width: var(--max-width);
|
|
761
|
+
box-sizing: border-box;
|
|
762
|
+
padding: var(--space-12) var(--space-16) var(--space-16);
|
|
763
|
+
}
|
|
764
|
+
.j-peek > header {
|
|
765
|
+
display: flex;
|
|
766
|
+
align-items: center;
|
|
767
|
+
justify-content: space-between;
|
|
768
|
+
gap: var(--space-8);
|
|
769
|
+
margin-right: calc(-1 * var(--space-8));
|
|
770
|
+
}
|
|
771
|
+
.j-peek > header > b {
|
|
772
|
+
min-width: 0;
|
|
773
|
+
font: var(--font-title);
|
|
774
|
+
overflow-wrap: anywhere;
|
|
775
|
+
}
|
|
776
|
+
.j-peek > .j-peek-body {
|
|
777
|
+
display: grid;
|
|
778
|
+
gap: var(--space-8);
|
|
779
|
+
margin: var(--space-4) 0 var(--space-16);
|
|
780
|
+
color: var(--muted);
|
|
781
|
+
font: var(--font-body);
|
|
782
|
+
}
|
|
783
|
+
.j-peek > .j-peek-body:empty {
|
|
784
|
+
margin-top: 0;
|
|
785
|
+
}
|
|
786
|
+
.j-peek > footer {
|
|
787
|
+
display: flex;
|
|
788
|
+
justify-content: flex-end;
|
|
789
|
+
}
|
|
790
|
+
.j-peek > footer[hidden] {
|
|
791
|
+
display: none;
|
|
792
|
+
}
|
|
793
|
+
/* a place popped: a small map of it, its pin at its middle, on the well a map has before its tiles */
|
|
794
|
+
.j-place {
|
|
795
|
+
position: relative;
|
|
796
|
+
overflow: hidden;
|
|
797
|
+
height: calc(5 * var(--space-32));
|
|
798
|
+
border: 1px solid var(--edge);
|
|
799
|
+
border-radius: var(--radius);
|
|
800
|
+
background: var(--well);
|
|
801
|
+
}
|
|
802
|
+
.j-place > img {
|
|
803
|
+
position: absolute;
|
|
804
|
+
}
|
|
805
|
+
.j-place > i {
|
|
806
|
+
position: absolute;
|
|
807
|
+
inset: 50% auto auto 50%;
|
|
808
|
+
width: var(--size-pin);
|
|
809
|
+
height: var(--size-pin);
|
|
810
|
+
margin: calc(var(--size-pin) / -2);
|
|
811
|
+
box-sizing: border-box;
|
|
812
|
+
border: calc(var(--space-4) / 2) solid var(--card);
|
|
813
|
+
border-radius: var(--radius-dot);
|
|
814
|
+
background: var(--accent);
|
|
815
|
+
}
|
|
434
816
|
/* .j-foot: a foot fixed at the screen's foot (a quick add, a balance), run on past it by 40vh, its words lifted by as
|
|
435
817
|
much, so nothing of the page shows under it, where an iPhone's address bar floats over the page and comes and
|
|
436
818
|
goes; its own padding below its words is --foot-pad, and the safe area's below that. An app sets its sides and its
|
|
@@ -445,31 +827,9 @@
|
|
|
445
827
|
background: var(--card);
|
|
446
828
|
}
|
|
447
829
|
|
|
448
|
-
/*
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
.j-scrim {
|
|
452
|
-
position: fixed;
|
|
453
|
-
inset: 0;
|
|
454
|
-
z-index: 12;
|
|
455
|
-
background: var(--scrim);
|
|
456
|
-
opacity: 0;
|
|
457
|
-
pointer-events: none;
|
|
458
|
-
transition: opacity var(--fall);
|
|
459
|
-
}
|
|
460
|
-
.j-scrim.j-on {
|
|
461
|
-
opacity: 1;
|
|
462
|
-
pointer-events: auto;
|
|
463
|
-
transition: opacity var(--rise);
|
|
464
|
-
}
|
|
465
|
-
.j-scrim.j-asking {
|
|
466
|
-
z-index: 30;
|
|
467
|
-
}
|
|
468
|
-
|
|
469
|
-
/* motion, as an iPhone's (src/tokens.json, motion): a drawer and a sheet rise into place and go back the way they
|
|
470
|
-
came (from the foot on a phone; wider, a drawer from the right, a sheet a little from below); a modal settles in
|
|
471
|
-
from a little larger and fades as it goes; a menu drops from its button. Under prefers-reduced-motion, nothing
|
|
472
|
-
moves */
|
|
830
|
+
/* motion, as an iPhone's (src/tokens.json, motion): wider, a docked drawer comes from the right and a sheet a little
|
|
831
|
+
from below, and each goes back the way it came; a menu drops from its button (on a phone, the sheet rises as Web
|
|
832
|
+
Awesome's drawer does). Under prefers-reduced-motion, nothing moves */
|
|
473
833
|
@media (prefers-reduced-motion: no-preference) {
|
|
474
834
|
:is(.drawer, .sheet) {
|
|
475
835
|
transition:
|
|
@@ -504,28 +864,6 @@
|
|
|
504
864
|
transform: translateY(12px);
|
|
505
865
|
}
|
|
506
866
|
}
|
|
507
|
-
dialog {
|
|
508
|
-
transition:
|
|
509
|
-
opacity var(--ask),
|
|
510
|
-
transform var(--ask),
|
|
511
|
-
display var(--ask) allow-discrete,
|
|
512
|
-
overlay var(--ask) allow-discrete;
|
|
513
|
-
}
|
|
514
|
-
dialog:not([open]) {
|
|
515
|
-
opacity: 0;
|
|
516
|
-
transform: scale(0.96);
|
|
517
|
-
transition:
|
|
518
|
-
opacity var(--ask-out),
|
|
519
|
-
transform var(--ask-out),
|
|
520
|
-
display var(--ask-out) allow-discrete,
|
|
521
|
-
overlay var(--ask-out) allow-discrete;
|
|
522
|
-
}
|
|
523
|
-
@starting-style {
|
|
524
|
-
dialog[open] {
|
|
525
|
-
opacity: 0;
|
|
526
|
-
transform: scale(1.06);
|
|
527
|
-
}
|
|
528
|
-
}
|
|
529
867
|
.j-choices[popover] {
|
|
530
868
|
transition:
|
|
531
869
|
opacity var(--drop),
|
|
@@ -545,62 +883,16 @@
|
|
|
545
883
|
}
|
|
546
884
|
}
|
|
547
885
|
|
|
548
|
-
/* on a phone, the drawer and a sheet are a phone's sheet: the width of the screen, risen from the foot, rounded at
|
|
549
|
-
the top and edged by nothing but the scrim behind; a grabber on its head, which stays in view as it scrolls */
|
|
550
|
-
@media (max-width: 40rem) {
|
|
551
|
-
:is(.drawer, .sheet) {
|
|
552
|
-
inset: auto 0 0;
|
|
553
|
-
width: auto;
|
|
554
|
-
max-height: 88dvh;
|
|
555
|
-
overflow: auto;
|
|
556
|
-
margin: 0;
|
|
557
|
-
border: 0;
|
|
558
|
-
border-radius: 14px 14px 0 0;
|
|
559
|
-
--pad: var(--space-16);
|
|
560
|
-
--pad-end: calc(var(--space-16) + env(safe-area-inset-bottom));
|
|
561
|
-
padding-bottom: var(--pad-end);
|
|
562
|
-
}
|
|
563
|
-
/* the drawer leaves the page in view above it: what it changes is there */
|
|
564
|
-
.drawer {
|
|
565
|
-
max-height: 70dvh;
|
|
566
|
-
}
|
|
567
|
-
:where(.drawer, .sheet) > :is(header, h2):first-child,
|
|
568
|
-
:where(.drawer, .sheet) > form > header:first-child {
|
|
569
|
-
padding-top: var(--space-20);
|
|
570
|
-
border-radius: 14px 14px 0 0;
|
|
571
|
-
}
|
|
572
|
-
:where(.drawer, .sheet) > :is(header, h2):first-child::before,
|
|
573
|
-
:where(.drawer, .sheet) > form > header:first-child::before {
|
|
574
|
-
content: "";
|
|
575
|
-
position: absolute;
|
|
576
|
-
top: var(--space-6);
|
|
577
|
-
left: 50%;
|
|
578
|
-
width: 36px;
|
|
579
|
-
height: 5px;
|
|
580
|
-
border-radius: 3px;
|
|
581
|
-
background: var(--edge);
|
|
582
|
-
transform: translateX(-50%);
|
|
583
|
-
}
|
|
584
|
-
@media (prefers-reduced-motion: no-preference) {
|
|
585
|
-
.drawer[hidden],
|
|
586
|
-
.sheet:not(:popover-open) {
|
|
587
|
-
opacity: 1;
|
|
588
|
-
transform: translateY(100%);
|
|
589
|
-
}
|
|
590
|
-
@starting-style {
|
|
591
|
-
.drawer:not([hidden]),
|
|
592
|
-
.sheet:popover-open {
|
|
593
|
-
opacity: 1;
|
|
594
|
-
transform: translateY(100%);
|
|
595
|
-
}
|
|
596
|
-
}
|
|
597
|
-
}
|
|
598
|
-
}
|
|
599
886
|
@media (max-width: 40rem), (pointer: coarse) {
|
|
600
887
|
.act,
|
|
601
888
|
:where(input:not([type="checkbox"], [type="radio"], [type="file"], [type="range"]), select) {
|
|
602
889
|
min-height: 44px;
|
|
603
890
|
}
|
|
891
|
+
/* a mention is pressed too: a finger tall, and at that height a tool's corners, not a pill's */
|
|
892
|
+
.j-mention {
|
|
893
|
+
min-height: var(--size-finger);
|
|
894
|
+
border-radius: var(--radius);
|
|
895
|
+
}
|
|
604
896
|
.icon-only {
|
|
605
897
|
width: 44px;
|
|
606
898
|
height: 44px;
|