@usableapp/cardds 0.7.160 → 0.7.162
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/CHANGELOG.md +43 -0
- package/css/actions.css +27 -34
- package/css/base.css +8 -5
- package/css/card.css +5 -5
- package/css/journey.css +5 -7
- package/css/layover.css +0 -1
- package/css/lists.css +2 -2
- package/css/media.css +5 -0
- package/css/numbers.css +1 -1
- package/css/palette.css +1 -1
- package/css/parts.css +78 -40
- package/css/sheet.css +1 -1
- package/css/stack.css +13 -5
- package/css/stamp.css +30 -30
- package/css/tokens.css +37 -4
- package/dist/actions/Btn.d.ts +59 -28
- package/dist/actions/Btn.js +17 -5
- package/dist/actions/BtnGroup.d.ts +3 -3
- package/dist/actions/BtnGroup.js +2 -2
- package/dist/actions/BtnRow.d.ts +2 -2
- package/dist/actions/BtnRow.js +1 -1
- package/dist/actions/Chip.d.ts +1 -1
- package/dist/actions/Fab.d.ts +11 -7
- package/dist/actions/Fab.js +6 -5
- package/dist/actions/LinkBlock.d.ts +4 -2
- package/dist/actions/LinkBlock.js +6 -3
- package/dist/cardds.css +213 -136
- package/dist/cards/CardParts.d.ts +1 -1
- package/dist/cards/CardParts.js +1 -1
- package/dist/catalog.json +1 -1
- package/dist/choice/Calendar.js +2 -2
- package/dist/forms/Composer.d.ts +2 -2
- package/dist/forms/Field.d.ts +1 -1
- package/dist/forms/Field.js +1 -1
- package/dist/forms/FileBtn.d.ts +8 -7
- package/dist/forms/FileBtn.js +3 -3
- package/dist/forms/MessageBar.d.ts +2 -2
- package/dist/forms/MessageBar.js +4 -4
- package/dist/forms/Pin.js +2 -3
- package/dist/index.d.ts +0 -1
- package/dist/index.js +0 -1
- package/dist/journey/JourneyBadge.d.ts +7 -4
- package/dist/journey/JourneyBadge.js +3 -3
- package/dist/lists/Bubble.d.ts +6 -6
- package/dist/lists/Row.js +5 -2
- package/dist/media/Postcard.d.ts +1 -1
- package/dist/media/Postcard.js +2 -2
- package/dist/media/Tile.d.ts +4 -6
- package/dist/media/Tile.js +2 -2
- package/dist/parts/End.d.ts +1 -1
- package/dist/parts/End.js +1 -1
- package/dist/parts/Foot.d.ts +3 -3
- package/dist/parts/Foot.js +1 -1
- package/dist/parts/Head.d.ts +3 -1
- package/dist/parts/Head.js +7 -2
- package/dist/parts/Words.d.ts +3 -1
- package/dist/parts/Words.js +13 -3
- package/dist/parts/endRoom.d.ts +11 -0
- package/dist/parts/endRoom.js +40 -0
- package/dist/post/PostDesk.js +2 -3
- package/dist/post/PostLetter.js +2 -2
- package/dist/scaffold/ActionBar.d.ts +4 -4
- package/dist/scaffold/ActionBar.js +3 -3
- package/dist/scaffold/AppBar.d.ts +1 -1
- package/dist/scaffold/FloatBar.d.ts +1 -1
- package/dist/scaffold/TopBar.d.ts +2 -2
- package/dist/sheets/Modal.d.ts +2 -2
- package/dist/sheets/Modal.js +2 -2
- package/dist/sheets/Sheet.d.ts +1 -1
- package/dist/sheets/Sheet.js +1 -1
- package/dist/sheets/SheetStack.js +3 -4
- package/dist/sheets/StackBack.d.ts +1 -1
- package/dist/sheets/StackBack.js +2 -3
- package/dist/sheets/StackSheet.d.ts +1 -1
- package/dist/sheets/StackSheet.js +2 -3
- package/dist/sheets/sheetDrag.js +2 -2
- package/dist/sheets/stackCard.js +5 -6
- package/dist/stamp/Stamp.d.ts +4 -2
- package/dist/stamp/Stamp.js +2 -2
- package/dist/state.d.ts +2 -0
- package/dist/state.js +9 -0
- package/dist/sticky/Sticky.d.ts +1 -1
- package/dist/sticky/StickyAnswer.d.ts +1 -1
- package/dist/sticky/StickyHeading.d.ts +2 -2
- package/dist/templates/CallSheet.js +1 -1
- package/dist/templates/Walkthrough.js +2 -2
- package/dist/type/Icon.d.ts +1 -1
- package/dist/type/Icon.js +1 -1
- package/dist/type/textScale.d.ts +4 -3
- package/dist/type/textScale.js +4 -3
- package/docs/reference.md +45 -25
- package/lint/rules.mjs +7 -7
- package/package.json +3 -1
- package/scripts/codemod-parts.mjs +1 -1
- package/dist/actions/IconBtn.d.ts +0 -326
- package/dist/actions/IconBtn.js +0 -19
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,49 @@
|
|
|
2
2
|
|
|
3
3
|
> For: a project that consumes `@usableapp/cardds` and its AI — what changed between versions, written as before → after, so a screen can be brought up to date without reading the source. Newest first. A consumer never edits cardds; if something here leaves you without a way to do what you did before, report the gap. Each release section after 0.7.97 carries one `Components:` line, written by `node scripts/components-changed.mjs <previous tag>`: the components the release changed, or `all` when a file changed that any component can read (a token, the build), or `none`; check only the screens that import those.
|
|
4
4
|
|
|
5
|
+
## 0.7.162 — 2026-10-29
|
|
6
|
+
|
|
7
|
+
One `Btn` for every button; a led line's title and meta flow round its ends; `TileGrid cols`; tokens only.
|
|
8
|
+
|
|
9
|
+
Components: all
|
|
10
|
+
|
|
11
|
+
### Added
|
|
12
|
+
- **`TileGrid cols={2}`** (timebank, Lh 2026-10-29: four time picks 2×2). Before → after: a plain TileGrid fits as many as `--tile-min` allows (3 across on a 428–440px phone) and a `wide` tile takes a row → `<TileGrid cols={2}>` is always two across; drop `wide` from tiles that share a row. In it an `inline` tile's words move under the icon when their longest word has no room beside it (a big text size).
|
|
13
|
+
- **`--r-tail`** (`--r-base` × 7/16, 9.1) and knob **`--bubble-tail-radius`**: a `Bubble`'s tail corner points (was 18.2).
|
|
14
|
+
- **`--glyph-rise` / `--glyph-drop`** (0.2em / 0.15em): the room a clipped line keeps for Thai marks, now tokens.
|
|
15
|
+
- Stories for every card of the feed: `Card/Feed*`, `Bubble/Feed*`.
|
|
16
|
+
|
|
17
|
+
### Changed
|
|
18
|
+
- **ONE `Btn` for every button** (Lh 2026-10-29: any button swaps for another). `IconBtn` is deleted, no alias. Single-choice props replace the booleans: `shape` `pill` (default) | `round`; `size` `sm` | `md` | `lg` | `xl`; `tone` `default` | `primary` | `quiet` | `warn`. A `round` needs `icon` and `label`. Before → after:
|
|
19
|
+
- `<IconBtn icon label …>` → `<Btn shape="round" icon label …>`; `IconBtn sm` / `size="lg"` / `size="xl"` → `size="sm"` / `"lg"` / `"xl"`; `IconBtn invert` or `primary` → `tone="primary"`; an `<Icon/>` child → `icon="…"`.
|
|
20
|
+
- `<Btn primary>` / `quiet` / `warn` → `tone="primary"` / `"quiet"` / `"warn"`; `Btn sm` / `Btn xl` → `size="sm"` / `size="xl"`.
|
|
21
|
+
- One height per step for both shapes: sm 44, md 48 (`--btn-h` = `--tap`, fixed, no longer grown by the text size; pills that rendered ~52–61 are 48), lg 56. xl is each shape's own: pill 88, round 68.
|
|
22
|
+
- A round takes all four tones. `FileBtn`: `tone` and `size` replace `primary` / `quiet`. `Fab`: `tone` (default `primary`) replaces `invert`.
|
|
23
|
+
- Classes and knobs keep their names: `.icon-btn`, `.icon-btn--invert`, `--icon-btn-invert-*` (read first by a round primary, then `--btn-primary-*`). New knob `--btn-lg-size`.
|
|
24
|
+
- **A led line** (a `Head` that starts with a `Lead`, `Avatar` or `AvatarStack`, and a `LinkBlock`'s place `Row`): the title and the meta are ONE block flowing round the ends at the top right; the meta follows the title at `--head-row-gap`, never pushed below the buttons; longer text runs under the ends at full width. The title's first line has its x-height middle on the ends' centre, whatever the ends are. New wrappers `.words__flow` and `.line-ends` in those lines.
|
|
25
|
+
- **An `End` of words with an icon is written `<End caption="…"><Icon name="arrow-up-right"/></End>`** (the icon inside): drawn at the words' size, its middle on their x-height middle, `--sp-1` from them (knob `--end-icon-gap`). An icon written after the End as a sibling no longer gets this.
|
|
26
|
+
- A chip's icon in a card head: on the words' x-height middle (was a −0.15em drop).
|
|
27
|
+
- **`TileGrid cols3` → `cols={3}`, `cols4` → `cols={4}`** (no alias).
|
|
28
|
+
- **`Stamp large` → `Stamp lg`** (class `.stamp--lg`). Every stamp drawing length is a token (`--stamp`, `--stamp-perf-*`, `--stamp-frame-w`, `--stamp-cap-*`, `--stamp-art-*`); the teeth count is a token only, the `--stamp-teeth` knob is removed. The small `words` line shows on `Stamp lg` or in `StampBook fill` (was a width query).
|
|
29
|
+
- **Tokens only** (Lh 2026-10-29): written-in lengths read the tokens they equal (`--tile-min`, `--icon-lg`, `--drawer-h` now in tokens.css, `--lh-h2`); no value changes.
|
|
30
|
+
- **The root no longer shrinks to 93.75% on screens ≤ 360**: screen size is never a trigger. On 320–360 screens everything is about 6% larger; an app that wants the old size sets `html { font-size }` itself.
|
|
31
|
+
- `JourneyBadge stretch` is always three lines; new `subBeside` gives the two-line form (was a height query).
|
|
32
|
+
- Gesture thresholds (SheetStack, Sheet drag, stack cards, PostDesk) read `--sp-2` / `--tap` when the gesture happens.
|
|
33
|
+
- `ActionBar inline` is a class (`.action-bar--inline`).
|
|
34
|
+
- Orchard's primary sets role tokens, so `--btn-primary-*` and `--icon-btn-invert-*` can be set under orchard.
|
|
35
|
+
- cardds has its own `eslint.config.mjs` (typescript-eslint).
|
|
36
|
+
|
|
37
|
+
## 0.7.161 — 2026-10-28
|
|
38
|
+
|
|
39
|
+
A led line's title runs under ANY end, not only round buttons; an End's arrow is drawn at its words' size and centred on the title's first line.
|
|
40
|
+
|
|
41
|
+
Components: Head, Words, Row, LinkBlock, End
|
|
42
|
+
|
|
43
|
+
### Changed
|
|
44
|
+
- **The title's later lines run under an `End` and a `Btn sm`** (timebank, Lh 2026-10-28: "ให้ cardds ไหลลงใต้ End ด้วย"). Before → after: in a led `Head` (a `Lead`, `Avatar` or `AvatarStack` first, then `Words` with a title and a meta) only one or two round `IconBtn`s let the title wrap under them; an `End` of words or a `Btn sm` kept a narrow title column → any one to four ends stand in the top-right corner and the title's lines past them run the full width. The same for a `Row` in a `LinkBlock` (the place under a map). Rows in a list are untouched. `Words` draws an unseen, inert copy of the ends at the title's start to keep their room; the real ends stay after the title in reading order. Nothing to change in a screen.
|
|
45
|
+
- **An `End` of words with an icon** (a link's arrow, `<End caption="Google Maps"/><Icon name="arrow-up-right"/>`): the icon is drawn at the words' size (`--icon-xs`), about their x-height, its stroke as heavy as their stem. New knob `--end-icon-size`. An End with a value keeps its icon as it was.
|
|
46
|
+
- **In a led head or that LinkBlock row, an End of words and its icon are centred on the title's first line**, not at the head's top. A round `IconBtn` and a `Btn sm` (taller than a line) keep the top.
|
|
47
|
+
|
|
5
48
|
## 0.7.160 — 2026-10-28
|
|
6
49
|
|
|
7
50
|
A head that leads with a stamp or an avatar, laid for a phone's width; Chrome and Safari set the same lines.
|
package/css/actions.css
CHANGED
|
@@ -66,9 +66,12 @@
|
|
|
66
66
|
Lh 2026-09-13) stand on the tap floor: a chip that is a switch grows to --tap here */
|
|
67
67
|
.appbar .chip--pick { min-height: var(--form-tap); }
|
|
68
68
|
|
|
69
|
-
/* ---- icon button (round) ----
|
|
69
|
+
/* ---- icon button (Btn shape="round") ----
|
|
70
|
+
ONE size ladder for both shapes (Lh 2026-10-29): a round and a pill of one step are one height, so either stands in for the other in a row.
|
|
71
|
+
md is --btn-h (= --tap: on --tap-base like the round, never on the words' --fs-base), sm --tap-sm, lg --tap-lg. xl is NOT swap-equal (Lh 2026-10-29): each shape its
|
|
72
|
+
own, round --tap-xl (68), pill --btn-xl-h (88) */
|
|
70
73
|
.icon-btn {
|
|
71
|
-
width: var(--icon-btn-size, var(--
|
|
74
|
+
width: var(--icon-btn-size, var(--btn-h)); height: var(--icon-btn-size, var(--btn-h));
|
|
72
75
|
flex: none;
|
|
73
76
|
border-radius: var(--icon-btn-radius, var(--r-chip));
|
|
74
77
|
border: var(--border-w) solid var(--icon-btn-border, var(--outline)); /* see .btn — same reason */
|
|
@@ -80,9 +83,11 @@
|
|
|
80
83
|
font-size: var(--fs-lg);
|
|
81
84
|
line-height: round(down, calc(var(--lh-solid) * 1em), 1px);
|
|
82
85
|
}
|
|
83
|
-
|
|
86
|
+
/* a round's primary tone (Btn shape="round" tone="primary" carries both names; `invert` was its name until Lh 2026-10-29): the round's own
|
|
87
|
+
invert knobs first — the themes' contract — then the pill's primary, so by default both shapes fill alike */
|
|
88
|
+
:is(.icon-btn--invert, .icon-btn--primary) { background: var(--icon-btn-invert-bg, var(--btn-primary-bg, var(--accent))); color: var(--icon-btn-invert-ink, var(--btn-primary-ink, var(--on-accent))); border-color: transparent; }
|
|
84
89
|
.icon-btn--sm { width: var(--icon-btn-sm-size, var(--tap-sm)); height: var(--icon-btn-sm-size, var(--tap-sm)); font-size: var(--fs-title); }
|
|
85
|
-
/* the bigger round sizes (`
|
|
90
|
+
/* the bigger round sizes (`Btn shape="round" size`): lg is the hero control's size (--tap-lg), xl the biggest (--tap-xl), both on --tap-base like every size.
|
|
86
91
|
What stands inside is a share of the circle (`--_ib`, its side), so it grows with it: the ICON is --icon-btn-icon of the side (7/12, the share of the default 48px
|
|
87
92
|
button's 28px icon), and a WORD (a string child) keeps to --icon-btn-word-max of the side (0.45: a word of four letters stays inside) — it still
|
|
88
93
|
grows with the member's text size, to that ceiling and no further. The default and the sm button keep their icon tokens and their word as before. */
|
|
@@ -137,33 +142,36 @@
|
|
|
137
142
|
background: var(--btn-bg, var(--action-bg));
|
|
138
143
|
color: var(--btn-ink, var(--action-ink));
|
|
139
144
|
border-radius: var(--btn-radius, var(--r-chip));
|
|
140
|
-
padding: var(--btn-pad-y, var(--sp-
|
|
145
|
+
padding: var(--btn-pad-y, var(--sp-1)) var(--btn-pad-x, var(--sp-6)); /* the height is the size step's (min-height), not the padding's: a pill and a round of one step stand one height */
|
|
141
146
|
font: var(--type-label);
|
|
142
147
|
font-size: var(--btn-font-size, var(--fs-md));
|
|
143
148
|
display: inline-flex;
|
|
144
149
|
align-items: center;
|
|
145
150
|
justify-content: center;
|
|
146
151
|
gap: var(--btn-gap, var(--sp-2));
|
|
147
|
-
min-height: var(--btn-h);
|
|
152
|
+
min-height: var(--btn-h); /* md: one tap (--btn-h = --tap), the round's height */
|
|
148
153
|
text-decoration: none; /* .btn works as <a> too */
|
|
149
154
|
}
|
|
150
|
-
/*
|
|
151
|
-
|
|
155
|
+
/* the tones (Btn tone), the pill's and the round's alike. primary: the palette's primary (orchard's yellow); the round's reads its invert knobs
|
|
156
|
+
first, then these (above) */
|
|
157
|
+
.btn--primary { background: var(--btn-primary-bg, var(--accent)); color: var(--btn-primary-ink, var(--on-accent)); border-color: transparent; }
|
|
152
158
|
/* quiet keeps a faint outline so it still reads as a button on colored palettes;
|
|
153
159
|
it is ink on whatever it sits on — inherit, or on the dark slot (card--3) it
|
|
154
160
|
would take the light-card action ink and vanish */
|
|
155
|
-
.btn--quiet
|
|
156
|
-
.btn--warn
|
|
161
|
+
:is(.btn--quiet, .icon-btn--quiet) { background: transparent; color: inherit; border-color: var(--btn-quiet-border, color-mix(in srgb, currentColor 35%, transparent)); }
|
|
162
|
+
:is(.btn--warn, .icon-btn--warn) { --dark: var(--action-dark); color: var(--btn-warn-ink, var(--signal-warn)); } /* a move to think twice about ("cancel the request"): the signal set's warning, on the button's own paper — its side, not the card's */
|
|
157
163
|
.btn--block { width: 100%; }
|
|
158
164
|
.btn--form { justify-self: center; align-self: center; margin-inline: auto; padding-inline: var(--btn-form-pad-x, calc(var(--sp-base) * 14.5)); /* 58px: "ส่งรหัส OTP" at 213px, 20% longer than at 40px sides (Lh 2026-09-25) */ } /* a form's button: its words + wide sides, centred in a grid (a step) or a block (Lh 2026-09-25) */
|
|
159
|
-
/* sm (
|
|
160
|
-
.btn--sm { min-height: var(--btn-sm-size, var(--
|
|
165
|
+
/* sm (Lh 2026-10-28): one small tap tall (the touch floor, 44, the round sm's), the small words, closer sides — a worded move at a card head's end */
|
|
166
|
+
.btn--sm { min-height: var(--btn-sm-size, var(--tap-sm)); padding-inline: var(--btn-sm-pad-x, var(--sp-4)); font-size: var(--btn-sm-font-size, var(--fs-sm)); }
|
|
167
|
+
/* lg: the hero control's height (--tap-lg, the round lg's) */
|
|
168
|
+
.btn--lg { min-height: var(--btn-lg-size, var(--tap-lg)); }
|
|
161
169
|
/* xl: the one giant call to action in a tinted card ("Taxi!") */
|
|
162
170
|
.btn--xl { min-height: var(--btn-xl-h); font: var(--fw-heavy) var(--fs-3xl) / round(down, calc(var(--lh-solid) * 1em), 1px) var(--font-display); letter-spacing: var(--track-h1); border-radius: var(--r-card); padding-inline: var(--sp-8); }
|
|
163
171
|
/* disabled keeps the slot — a control that vanishes moves everything else,
|
|
164
172
|
and a pager whose "previous" disappeared on page one would shift the bar
|
|
165
173
|
under the thumb on every page */
|
|
166
|
-
/* SENDING (Btn
|
|
174
|
+
/* SENDING (Btn sending, Lh 2026-10-28): something goes OUT from the button — for --motion-send its icon swells and tips forward,
|
|
167
175
|
and two rings spread from its edge one after the other (--btn-sending-ink, the accent); then the app swaps the icon or puts the sent thing in.
|
|
168
176
|
Under reduced motion nothing moves (the app is told at once) */
|
|
169
177
|
@media (prefers-reduced-motion: no-preference) {
|
|
@@ -184,29 +192,14 @@
|
|
|
184
192
|
/* link block (LinkBlock, Lh 2026-10-28): a few pieces of a card's content as one link — stacked with the card's gap, the holder's ink, no underline,
|
|
185
193
|
no frame, no padding; the DIM press answer (below) */
|
|
186
194
|
.link-block { display: grid; gap: var(--link-block-gap, var(--card-gap)); color: inherit; text-decoration: none; }
|
|
187
|
-
/* a Row in a link block with a lead
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
.link-block > .row:has(> .lead:first-child + .words > .words__title:first-child + .words__meta) {
|
|
193
|
-
display: grid;
|
|
194
|
-
grid-template-columns: auto minmax(0, 1fr) repeat(4, auto);
|
|
195
|
-
grid-template-rows: minmax(min-content, 0);
|
|
196
|
-
grid-auto-rows: auto;
|
|
197
|
-
column-gap: 0;
|
|
198
|
-
row-gap: var(--words-gap, var(--sp-0));
|
|
199
|
-
align-items: start;
|
|
200
|
-
align-content: start;
|
|
201
|
-
}
|
|
202
|
-
.link-block > .row:has(> .lead:first-child + .words > .words__title:first-child + .words__meta) > .lead { grid-column: 1; grid-row: 1 / 3; margin-inline-end: var(--row-gap, var(--sp-3)); }
|
|
203
|
-
.link-block > .row:has(> .lead:first-child + .words > .words__title:first-child + .words__meta) > .words { display: contents; }
|
|
204
|
-
.link-block > .row:has(> .lead:first-child + .words > .words__title:first-child + .words__meta) > .words > .words__title { grid-column: 2; grid-row: 1; }
|
|
205
|
-
.link-block > .row:has(> .lead:first-child + .words > .words__title:first-child + .words__meta) > .words > .words__meta { grid-column: 2 / -1; grid-row: 2; }
|
|
206
|
-
.link-block > .row:has(> .lead:first-child + .words > .words__title:first-child + .words__meta) > :nth-child(n + 3) { grid-row: 1; margin-inline-start: var(--row-gap, var(--sp-3)); }
|
|
195
|
+
/* a Row in a link block with a lead (Lh 2026-10-28, the place under a map): a led line, laid as a led Head is (parts.css "a LED LINE"): the lead
|
|
196
|
+
at the left, the place and its note ONE flowing block round the end (an End's words and their arrow), which stands at the top right with
|
|
197
|
+
its centre on the place's x-height middle; the words run under it at full width. Only here: a list's rows are untouched.
|
|
198
|
+
<a class="link-block">…<div class="row"><span class="lead">…</span><span class="words"><span class="words__room" …>…</span><span class="words__title">…</span><span class="words__meta">…</span></span><span class="line-ends"><span class="end">…<svg class="icon"/></span></span></div></a> */
|
|
199
|
+
.link-block > .row:has(> .line-ends) { --_led-gap: var(--words-gap, var(--sp-0)); --_led-col-gap: var(--row-gap, var(--sp-3)); --_led-title-font: var(--words-title-font, var(--type-title)); }
|
|
207
200
|
/* a row of buttons sharing the width (twin CTAs inside a card) */
|
|
208
201
|
.btn-row { display: flex; gap: var(--btn-row-gap, var(--sp-2)); }
|
|
209
|
-
/* round (BtnRow round, Lh 2026-10-24): a few round
|
|
202
|
+
/* round (BtnRow round, Lh 2026-10-24): a few round Btns as one group in the middle of a card's content, a fixed gap apart — Foot round's look,
|
|
210
203
|
so a card's foot stays its status line */
|
|
211
204
|
.btn-row--round { justify-content: center; align-items: center; gap: var(--btn-row-gap, var(--sp-6)); }
|
|
212
205
|
.btn-row > .btn { flex: 1; min-width: 0; }
|
package/css/base.css
CHANGED
|
@@ -16,13 +16,13 @@ button, [role="button"], [role="tab"], [role="option"], [role="menuitem"], a.btn
|
|
|
16
16
|
}
|
|
17
17
|
|
|
18
18
|
/* the scale: everything is rem, so this one number resizes the whole system.
|
|
19
|
-
100% = the browser's text size (16px by default)
|
|
20
|
-
|
|
19
|
+
100% = the browser's text size (16px by default), on every screen: the screen's size is
|
|
20
|
+
never a trigger (Lh 2026-10-29). An app that wants a smaller scale on a narrow phone sets
|
|
21
|
+
`html { font-size }` itself, in its own css, by whatever rule it picks.
|
|
21
22
|
An app's OWN text-size setting is NOT here (Lh 2026-09-22: --text-scale, which
|
|
22
23
|
multiplied the root, zoomed the UI too — retired): it is --fs-base on <html>,
|
|
23
24
|
the type base, so the words grow and the things keep their size (tokens.css). */
|
|
24
25
|
html { font-size: 100%; }
|
|
25
|
-
@media (max-width: 22.5em) { html { font-size: 93.75%; } }
|
|
26
26
|
|
|
27
27
|
body {
|
|
28
28
|
margin: 0;
|
|
@@ -278,6 +278,9 @@ button:enabled { cursor: pointer; } /* a disabled one keeps the arrow */
|
|
|
278
278
|
.screen.screen--fill:has(> .appbar) { padding-top: var(--safe-top); --header-gap: 0rem; }
|
|
279
279
|
/* a plain screen is a column at least one phone tall when it ends on an .action-bar or holds a .screen__centre (step.css, card.css) */
|
|
280
280
|
.screen:not(.screen--fill):has(> .action-bar:last-child, > .screen__centre) { display: flex; flex-direction: column; min-height: 100dvh; }
|
|
281
|
+
/* a bare bar for a preview (ActionBar inline): no position, full width, no side padding. The :is() lifts it over every place
|
|
282
|
+
rule of the bar (actions.css: .action-bar, .screen--fill > .action-bar, the sticky last row), which load after this file */
|
|
283
|
+
.action-bar--inline:is(.action-bar, .screen:not(.screen--fill) > .action-bar:last-child) { position: static; width: 100%; max-width: none; padding-inline: 0; }
|
|
281
284
|
/* the centred group: the place of a .card--centre (card.css), for a small group of things */
|
|
282
285
|
.screen--fill > .screen__centre {
|
|
283
286
|
position: absolute;
|
|
@@ -380,8 +383,8 @@ button:enabled { cursor: pointer; } /* a disabled one keeps the arrow */
|
|
|
380
383
|
overflow: hidden;
|
|
381
384
|
text-overflow: ellipsis;
|
|
382
385
|
white-space: nowrap;
|
|
383
|
-
padding-block:
|
|
384
|
-
margin-block: -
|
|
386
|
+
padding-block: var(--glyph-rise) var(--glyph-drop); /* Thai marks survive the clip (tokens.css, the glyphs' room) */
|
|
387
|
+
margin-block: calc(-1 * var(--glyph-rise)) calc(-1 * var(--glyph-drop));
|
|
385
388
|
}
|
|
386
389
|
/* ---- where it sits in what media.css draws (docs/reference.md rule 15) ---- */
|
|
387
390
|
.postcard__band .icon-btn[aria-pressed="true"] .icon { fill: currentColor; }
|
package/css/card.css
CHANGED
|
@@ -97,7 +97,7 @@
|
|
|
97
97
|
.card__middle--full > .bullets { align-self: stretch; text-align: start; } /* a list of steps keeps the card's width and reads from the start edge (centred, each line's pic would float with its words) */
|
|
98
98
|
.card__turn { position: absolute; inset: 0; width: var(--px); height: var(--px); padding: 0; border: 0; overflow: hidden; clip-path: inset(50%); }
|
|
99
99
|
.card__face:has(> .card__turn:focus-visible) { outline: var(--focus); outline-offset: calc(-1 * var(--sp-1)); }
|
|
100
|
-
.head > .chip-row > .chip > .icon { --icon-display: inline-block; --icon-align:
|
|
100
|
+
.head > .chip-row > .chip > .icon { --icon-display: inline-block; --icon-align: middle; --icon-margin: 0 var(--chip-sm-gap, var(--sp-1)) 0 0; }
|
|
101
101
|
|
|
102
102
|
/* ---- bleed: a scrolling track that runs to the container's edges ----
|
|
103
103
|
For a horizontal strip inside a padded container — .avatar-pick, .chip-row,
|
|
@@ -147,7 +147,7 @@
|
|
|
147
147
|
opacity: var(--off);
|
|
148
148
|
min-height: calc(var(--tap-base) * 10 / 3);
|
|
149
149
|
}
|
|
150
|
-
.ph--sm { min-height:
|
|
150
|
+
.ph--sm { min-height: var(--tile-min); }
|
|
151
151
|
.ph--md { min-height: calc(var(--tap-base) * 3); }
|
|
152
152
|
/* ---- centred card: one thing to read, at the human centre of a fill screen ----
|
|
153
153
|
(.screen__centre below is the same placement for a small GROUP of things)
|
|
@@ -419,8 +419,8 @@
|
|
|
419
419
|
}
|
|
420
420
|
|
|
421
421
|
/* ---- where it sits in what base.css draws (docs/reference.md rule 15) ---- */
|
|
422
|
-
.page > :is(img, .ph) { max-height: var(--page-media-h,
|
|
423
|
-
.page > .ph { width: 100%; height: var(--page-media-h,
|
|
422
|
+
.page > :is(img, .ph) { max-height: var(--page-media-h, var(--drawer-h)); width: auto; height: auto; max-width: 100%; object-fit: contain; justify-self: start; align-self: start; } /* height auto: an <img> with width/height attributes keeps its ratio inside the cap — no band under the picture */
|
|
423
|
+
.page > .ph { width: 100%; height: var(--page-media-h, var(--drawer-h)); }
|
|
424
424
|
/* ---- where it sits in what stack.css draws (docs/reference.md rule 15) ---- */
|
|
425
425
|
.sheet-stack > .card {
|
|
426
426
|
grid-area: 1 / 1; /* every card shares the stack's cell; later ones offset down */
|
|
@@ -551,7 +551,7 @@
|
|
|
551
551
|
width: calc(100% + 2 * var(--screen-pad)); /* the content's width: the page's inset given back */
|
|
552
552
|
max-width: none;
|
|
553
553
|
margin-inline: calc(-1 * var(--screen-pad));
|
|
554
|
-
height: calc(var(--_lead, 0rem) + var(--page-media-h,
|
|
554
|
+
height: calc(var(--_lead, 0rem) + var(--page-media-h, var(--drawer-h)));
|
|
555
555
|
max-height: none;
|
|
556
556
|
border-radius: 0;
|
|
557
557
|
border-inline: 0;
|
package/css/journey.css
CHANGED
|
@@ -50,9 +50,9 @@
|
|
|
50
50
|
.tile-badge--plain .tile-badge__value { font: var(--fw-heavy) var(--fs-h1) / round(down, calc(var(--lh-solid) * 1em), 1px) var(--font-display); }
|
|
51
51
|
|
|
52
52
|
/* stretch: a date in a head (Lh 2026-10-19) — as tall as the title block beside it and no taller (the head stretches it; size
|
|
53
|
-
containment keeps its own words from adding height).
|
|
54
|
-
|
|
55
|
-
its three lines (2026-10-21, timebank: beside a four-line title it was a tall empty block); held there, it stands at the head's top. */
|
|
53
|
+
containment keeps its own words from adding height). Three lines, day · number · month; `--sub-beside` (the app's prop, never its
|
|
54
|
+
height: a box's size is not a trigger, Lh 2026-10-29) = two lines, the day name over the number and the month on one line. It grows
|
|
55
|
+
no taller than its three lines (2026-10-21, timebank: beside a four-line title it was a tall empty block); held there, it stands at the head's top. */
|
|
56
56
|
.tile-badge--stretch {
|
|
57
57
|
line-height: var(--tile-badge-line, var(--lh-badge)); /* the knob's own property, a ratio here: each line rounds it at its own size (below), and the caps add those lines */
|
|
58
58
|
align-self: stretch;
|
|
@@ -74,10 +74,8 @@
|
|
|
74
74
|
padding: var(--sp-3); /* the same room on all four sides; the box's min height and width count it */
|
|
75
75
|
}
|
|
76
76
|
.tile-badge--stretch > * { line-height: round(down, calc(var(--tile-badge-line, var(--lh-badge)) * 1em), 1px); white-space: nowrap; } /* a value never breaks at its dash */
|
|
77
|
-
.tile-badge--stretch >
|
|
78
|
-
|
|
79
|
-
.tile-badge--stretch > * { grid-column: 1 / -1; }
|
|
80
|
-
}
|
|
77
|
+
.tile-badge--stretch > * { grid-column: 1 / -1; }
|
|
78
|
+
.tile-badge--stretch.tile-badge--sub-beside > :not(:first-child) { grid-column: auto; } /* the number and the month share the second line */
|
|
81
79
|
|
|
82
80
|
/* where it sits in a head that leads with the date (card.css): the first cell, as tall as the chips beside it however many rows, so no cap */
|
|
83
81
|
.head:has(> .tile-badge:first-child + .chip-row) > .tile-badge--stretch:first-child { grid-column: 1; grid-row: 1; max-block-size: none; }
|
package/css/layover.css
CHANGED
|
@@ -31,7 +31,6 @@
|
|
|
31
31
|
sets open={false}).
|
|
32
32
|
Reduced motion: the finished state, no beats; closing fires at once. */
|
|
33
33
|
.modal {
|
|
34
|
-
--drawer-h: calc(var(--tap-base) * 14 / 3);
|
|
35
34
|
position: absolute; /* at the stage's centre, and kept there as it grows: its middle is pinned at 50% and */
|
|
36
35
|
top: 50%; /* translate -50% of its OWN height re-centres it on every height. NOT inset 0 + margin auto + */
|
|
37
36
|
inset-inline: 0; /* align-self: center — Safari 18 ignores align-self on an absolute box in a block container, */
|
package/css/lists.css
CHANGED
|
@@ -108,7 +108,7 @@
|
|
|
108
108
|
min-width: 0;
|
|
109
109
|
padding: var(--bubble-body-pad-y, var(--sp-3)) var(--bubble-body-pad-x, var(--sp-4));
|
|
110
110
|
border-radius: var(--bubble-body-radius, var(--r-card));
|
|
111
|
-
border-bottom-left-radius: var(--r-control)
|
|
111
|
+
border-bottom-left-radius: var(--bubble-tail-radius, var(--r-tail)); /* the tail: the corner nearest the sender, a corner that points (Lh 2026-10-29: --r-control read round) */
|
|
112
112
|
background: var(--bubble-body-bg, var(--card-2-bg));
|
|
113
113
|
--dark: var(--card-2-dark);
|
|
114
114
|
color: var(--bubble-body-ink, var(--card-ink));
|
|
@@ -117,7 +117,7 @@
|
|
|
117
117
|
}
|
|
118
118
|
.bubble--right > .bubble__body {
|
|
119
119
|
border-bottom-left-radius: var(--r-card);
|
|
120
|
-
border-bottom-right-radius: var(--r-
|
|
120
|
+
border-bottom-right-radius: var(--bubble-tail-radius, var(--r-tail));
|
|
121
121
|
background: var(--accent);
|
|
122
122
|
color: var(--on-accent);
|
|
123
123
|
text-align: right;
|
package/css/media.css
CHANGED
|
@@ -24,6 +24,11 @@
|
|
|
24
24
|
grid-template-columns: repeat(auto-fill, minmax(min(var(--tile-min), 100%), 1fr));
|
|
25
25
|
gap: var(--tile-grid-gap, var(--sp-3));
|
|
26
26
|
}
|
|
27
|
+
/* two across at every phone width (four picks 2×2). An inline tile's words stand beside the icon while their longest word fits there, else under it (a big text size) */
|
|
28
|
+
.tile-grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
|
|
29
|
+
.tile-grid--2 > .tile--inline { display: flex; flex-wrap: wrap; gap: var(--tile-text-gap, var(--sp-0)) var(--tile-inline-gap, var(--sp-3)); }
|
|
30
|
+
.tile-grid--2 > .tile--inline .tile__text { display: grid; gap: var(--tile-text-gap, var(--sp-0)); flex: 1 1 0; min-width: min-content; }
|
|
31
|
+
.tile-grid--2 > .tile--inline :is(.tile__label, .tile__sub) { overflow-wrap: anywhere; } /* a word longer than the whole tile breaks, never runs out of it */
|
|
27
32
|
.tile-grid--3 { --tile-min: calc(var(--tap-base) * 2); } /* three across on a phone (attachments, upload kinds) */
|
|
28
33
|
/* four across on a phone: small square actions — the icon over a short label, centred (copy · share · draw · save on a sheet) */
|
|
29
34
|
.tile-grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--tile-grid-gap, var(--sp-2)); }
|
package/css/numbers.css
CHANGED
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
As tall as the top bar (--header-h), and a step is a MARK, not a control: its round is well under
|
|
44
44
|
the tap floor, so it reads as progress and never as something to press (Lh 2026-10-03). */
|
|
45
45
|
.track {
|
|
46
|
-
--_step:
|
|
46
|
+
--_step: var(--icon-lg); /* 32 the round of one step */
|
|
47
47
|
--_pad: calc((var(--header-h) - var(--_step)) / 2); /* 14 round + its room = the top bar's height; the end rounds sit concentric in the pill */
|
|
48
48
|
/* the track lays down the accent fill of where it stands (the brand on a light card, the card's ink on the brand card), so it is a
|
|
49
49
|
surface of that fill's side; its steps re-point the accent to its ink, as the brand card slot does (docs/reference.md rule 10) */
|
package/css/palette.css
CHANGED
|
@@ -99,7 +99,7 @@
|
|
|
99
99
|
[data-palette="orchard"] .pin__cell { background: var(--pin-cell-bg, #ffffff); color: var(--ink-onlight); }
|
|
100
100
|
/* the vivid ones, tried on the live parts (Lh 2026-09-25): primary = yellow · a user avatar = fuchsia · maple only on small dots (the count, dot a); the chosen stack tab stays moss.
|
|
101
101
|
Every switch (Toggle, Check, a pick, a Ring…) is the brand, --accent / --on-accent, as on every palette: no switch rule here (Lh 2026-10-25) */
|
|
102
|
-
[data-palette="orchard"] :is(.btn--primary, .icon-btn--primary) {
|
|
102
|
+
[data-palette="orchard"] :is(.btn--primary, .icon-btn--primary) { --accent: var(--highlight-2); --on-accent: var(--ink-onlight); } /* the primary's own accent (role tokens only): actions.css paints it, so --btn-primary-* and --icon-btn-invert-* still win */
|
|
103
103
|
[data-palette="orchard"] .avatar:not(.avatar--outline, .avatar--add, .avatar--on) { background: var(--avatar-bg, var(--highlight-4)); --dark: 1; }
|
|
104
104
|
|
|
105
105
|
/* ---- VERS — Lh's own-palette pick (2026-09-25): white surface, champagne paper, sage brand; earth tones for tones 2·4·5 ---- */
|
package/css/parts.css
CHANGED
|
@@ -31,6 +31,13 @@
|
|
|
31
31
|
.row > .words { min-width: 0; }
|
|
32
32
|
.words__title { font: var(--words-title-font, var(--type-title)); overflow-wrap: anywhere; } /* wraps freely — no clip, so no padding trick for Thai marks (Lh 2026-09-16, same call as the card heading) */
|
|
33
33
|
.words__over { font: var(--words-over-font, var(--type-caption)); } /* the caption over the title (Words over): its own knob, as title and meta have — a low bar sets all three smaller from outside */
|
|
34
|
+
/* the ends' room (Lh 2026-10-28): an unseen, inert copy of the ends of a led line (Words renders it at the start of its words when the line hands
|
|
35
|
+
it them: a led Head, a LinkBlock's Row), floated at their top right, so it is exactly as wide and as tall as the ends whatever they are and
|
|
36
|
+
the title and the meta run under the real ends. Nothing until a led line lays it out (below, "a LED LINE") */
|
|
37
|
+
.words__room {
|
|
38
|
+
display: none; float: right; align-items: flex-start; width: max-content; visibility: hidden; -webkit-user-select: none; user-select: none;
|
|
39
|
+
letter-spacing: normal; /* a heading's tracking (.t-h2) is inherited and no type class of the ends resets it: the copy would come out narrower than the ends */
|
|
40
|
+
}
|
|
34
41
|
.words__meta { font: var(--words-meta-font, var(--type-caption)); color: var(--words-meta-ink, var(--card-muted)); display: flex; align-items: center; gap: var(--words-meta-gap, var(--sp-1)); }
|
|
35
42
|
.row--lg > .words > .words__title { font: var(--fw-bold) var(--fs-lg) / round(down, calc(var(--lh-h1) * 1em), 1px) var(--font-display); }
|
|
36
43
|
.row--done > .words > .words__title { color: var(--card-muted); }
|
|
@@ -38,6 +45,19 @@
|
|
|
38
45
|
/* ---- end: the value over its caption, right-aligned at the end of a line ---- */
|
|
39
46
|
.end { margin-left: auto; text-align: right; display: grid; gap: var(--end-gap, var(--sp-0)); justify-items: end; }
|
|
40
47
|
.row > .end { flex: none; }
|
|
48
|
+
/* an End of words with an icon in it (a link's arrow: `<End caption="Google Maps"><Icon name="arrow-up-right" /></End>`; Lh 2026-10-29): the two
|
|
49
|
+
read as ONE. They stand on one line of the caption's type, the icon drawn at the words' size (--icon-xs, the caption's: its drawing about as
|
|
50
|
+
tall as their x-height, its stroke as heavy as their stem) and set in the line as a letter is: its middle on the words' x-height middle
|
|
51
|
+
(vertical-align: middle, the caption's own baseline + half its x-height), never at the line's top. The gap between them is a word pair's
|
|
52
|
+
(--end-icon-gap, --sp-1), well under the gap between the End and anything else on the line (--row-gap / --head-col-gap, --sp-3). An End
|
|
53
|
+
with a value (over its caption) keeps its lines as they are. */
|
|
54
|
+
.end:not(:has(> .t-title)):has(> .icon) { display: block; font: var(--type-caption); white-space: nowrap; }
|
|
55
|
+
.end:not(:has(> .t-title)) > .icon {
|
|
56
|
+
--icon-size: var(--end-icon-size, var(--icon-xs));
|
|
57
|
+
--icon-display: inline-block;
|
|
58
|
+
--icon-align: middle;
|
|
59
|
+
}
|
|
60
|
+
.end:not(:has(> .t-title)) > * + .icon { --icon-margin: 0 0 0 var(--end-icon-gap, var(--sp-1)); }
|
|
41
61
|
|
|
42
62
|
/* ---- head: the first row of a card, a sheet and a stack sheet. A lead, the Words, chips, an end, as its direct children.
|
|
43
63
|
<div class="head"><h2 class="words__title t-h2">…</h2><span class="words__meta t-caption t-muted">…</span><button class="icon-btn icon-btn--sm">…</button></div>
|
|
@@ -86,15 +106,13 @@
|
|
|
86
106
|
-webkit-line-clamp: var(--head-title-lines, 3);
|
|
87
107
|
line-clamp: var(--head-title-lines, 3);
|
|
88
108
|
overflow: hidden;
|
|
89
|
-
padding-block: var(--
|
|
90
|
-
margin-block: calc(-1 * var(--
|
|
91
|
-
--_mark-room: 0.2em;
|
|
92
|
-
--_mark-foot: 0.15em; /* a lower vowel reaches 0.30em under the baseline, a tight line box (1.15) ends 0.175em under it */
|
|
109
|
+
padding-block: var(--glyph-rise) var(--glyph-drop); /* a stacked Thai mark rises over the first line's box, a lower vowel hangs under the last: room inside the clip, given back outside */
|
|
110
|
+
margin-block: calc(-1 * var(--glyph-rise)) calc(-1 * var(--glyph-drop));
|
|
93
111
|
}
|
|
94
112
|
|
|
95
|
-
.head > .words__title, .head > .words__over-title > .words__title { font: var(--words-title-font, var(--_type, var(--type-h2))); } /* --_type: the level's own face, set by .t-h1 and .t-display (base.css) */
|
|
96
|
-
.page > .head > h1.words__title, .page > .head > .words__over-title > h1.words__title { font-size: var(--fs-h2); } /* the page's ONE heading on the base (a screen with no TopBar) reads at the card heading's size — h1 is the semantic level, not a bigger face; --fs-h1 is the bar title's size (Lh 2026-09-22) */
|
|
97
|
-
.head > .words__meta { display: block; align-items: initial; gap: initial; } /* a head's caption is text; the flex line with a Dot is a row's */
|
|
113
|
+
.head > .words__title, .head > .words__over-title > .words__title, .head > .words__flow > .words__title { font: var(--words-title-font, var(--_type, var(--type-h2))); } /* --_type: the level's own face, set by .t-h1 and .t-display (base.css) */
|
|
114
|
+
.page > .head > h1.words__title, .page > .head > .words__over-title > h1.words__title, .page > .head > .words__flow > h1.words__title { font-size: var(--fs-h2); } /* the page's ONE heading on the base (a screen with no TopBar) reads at the card heading's size — h1 is the semantic level, not a bigger face; --fs-h1 is the bar title's size (Lh 2026-09-22) */
|
|
115
|
+
.head > .words__meta, .head > .words__flow > .words__meta { display: block; align-items: initial; gap: initial; } /* a head's caption is text; the flex line with a Dot is a row's */
|
|
98
116
|
|
|
99
117
|
/* a stage sheet's head (`Head centre`): a round button · the centred title over its meta · a round button. The title and the meta
|
|
100
118
|
stand in the middle column, the buttons span both rows; the 1fr rows keep the pair centred when a button is the taller */
|
|
@@ -154,11 +172,10 @@
|
|
|
154
172
|
.head:has(> .tile-badge:first-child + .chip-row) > :nth-child(n + 3) { grid-column: 1 / -1; grid-row: auto; }
|
|
155
173
|
|
|
156
174
|
/* a head that LEADS with a person or a thing (Lh 2026-10-28, timebank's welcome card; re-laid for a phone's width the same day): a `Head` whose
|
|
157
|
-
first child is a `Lead`, an `Avatar` or an `AvatarStack` (a stamp in one) and whose second is the `Words` title.
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
stands in the MIDDLE of the lead. The title is cut at
|
|
175
|
+
first child is a `Lead`, an `Avatar` or an `AvatarStack` (a stamp in one) and whose second is the `Words` title. The lead at the left, as tall
|
|
176
|
+
as the head; at its right the title, and the meta on a line of its own under it, as wide as the title. With ends after the Words (an `End`, a
|
|
177
|
+
round `Btn`, a `Btn size="sm"`) it is a led line (below): the title and the meta flow round the ends. No end: the title takes the line. No
|
|
178
|
+
meta: no second line, no gap, and the title (and its ends) stand in the MIDDLE of the lead. The title is cut at
|
|
162
179
|
--head-title-lines (above), the meta at --head-meta-lines (none). A head with no lead before its title is untouched.
|
|
163
180
|
The gaps are margins, not column-gap: the head keeps four spare columns of no width for its ends, so the meta can run to the last (2 / -1).
|
|
164
181
|
The first row is minmax(min-content, 0): a lead taller than title + meta gives its extra room to the meta's row, never between the two lines.
|
|
@@ -174,30 +191,51 @@
|
|
|
174
191
|
}
|
|
175
192
|
.head:not(.head--centre):has(> :is(.lead, .avatar, .avatar-stack):first-child + :is(.words__title, .words__over-title)) > :first-child { grid-column: 1; grid-row: 1; margin-inline-end: var(--head-col-gap, var(--sp-3)); }
|
|
176
193
|
.head:not(.head--centre):has(> :is(.lead, .avatar, .avatar-stack):first-child + :is(.words__title, .words__over-title) + .words__meta) > :first-child { grid-row: 1 / 3; }
|
|
177
|
-
/*
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
194
|
+
/* a LED LINE (Lh 2026-10-29, the feed's cards): a led `Head` (a `Lead`, an `Avatar` or an `AvatarStack`, then the `Words`, then its ends) and a
|
|
195
|
+
`LinkBlock`'s `Row` (a `Lead`, the `Words`, its ends), laid by ONE rule whatever ends them (round Btns, a Btn sm, an End's words and their
|
|
196
|
+
arrow, a time caption and a ⋯). The components hand it three pieces (endRoom.ts): the lead; the words as ONE flowing block, the title then the
|
|
197
|
+
meta (.words__flow in a head, the .words box in a row), with the ends' room (.words__room, their unseen copy) floated at its top right; and
|
|
198
|
+
the real ends in one box, .line-ends, over the room.
|
|
199
|
+
- The title and the meta wrap round the room, so round the ends, and run under them at the full width; the meta follows the title at the
|
|
200
|
+
words' gap (--head-row-gap / --words-gap), beside the ends or under them, never held down to their height.
|
|
201
|
+
- The title's FIRST line has its x-height middle on the ends' centre, one line or many (Lh 2026-10-29). Both boxes stand on one baseline
|
|
202
|
+
(align-self: first baseline): the words' first baseline is the title's first line's; the ends' box sets its baseline half an x-height of
|
|
203
|
+
the TITLE's type under its middle (its ::before: an empty box 1ex tall in that type, centred among the ends: an empty box's baseline is
|
|
204
|
+
its bottom). Baseline + ½ex on both sides: the ends' centre meets the title's x-height middle. No metric is written: the browser takes
|
|
205
|
+
the ex of the title's own font. Whichever stands higher is at the top of the row; the other comes down to meet it.
|
|
206
|
+
- The lead stands at the left from the top; with no meta, the words and the ends stand in the MIDDLE of the lead.
|
|
207
|
+
- The title is cut at --head-title-lines and the meta at --head-meta-lines by their height (whole lines, no "…"): a line clamp is a
|
|
208
|
+
formatting context of its own, which floats stay out of (and WebKit draws a float inside one as a box above the words), and an overflow
|
|
209
|
+
clip draws no Thai mark past the box unless the box is padded, and padding a box in the flow costs margins that collapse. So the box is
|
|
210
|
+
cut at whole lines by max-height and its words beyond are cut by clip-path, its edge the glyphs' room (--glyph-rise over, --glyph-drop
|
|
211
|
+
under) outside the box: the boxes keep no padding and no margin but the words' gap, and the meta follows the title exactly at it.
|
|
212
|
+
<div class="head"><span class="avatar-stack">…</span><div class="words__flow"><span class="words__room" aria-hidden="true" inert>…copies…</span><h2 class="words__title t-h2">…</h2><span class="words__meta t-caption t-muted">…</span></div><span class="line-ends"><button class="btn btn--round">…</button></span></div>
|
|
213
|
+
<a class="link-block">…<div class="row"><span class="lead">…</span><span class="words"><span class="words__room" …>…</span><span class="words__title">…</span><span class="words__meta">…</span></span><span class="line-ends"><span class="end">…<svg class="icon"/></span></span></div></a> */
|
|
214
|
+
:is(.head, .link-block > .row):has(> .line-ends) {
|
|
215
|
+
display: grid;
|
|
216
|
+
grid-template-columns: auto minmax(0, 1fr) auto;
|
|
217
|
+
grid-template-rows: [lead top] auto [top-end] auto [lead-end];
|
|
218
|
+
gap: 0;
|
|
219
|
+
align-items: start;
|
|
220
|
+
align-content: start;
|
|
200
221
|
}
|
|
222
|
+
.head:has(> .line-ends):not(:has(> .words__flow > .words__meta)) { grid-template-rows: [lead] auto [top] auto [top-end] auto [lead-end]; }
|
|
223
|
+
:is(.head, .link-block > .row):has(> .line-ends) > :first-child { grid-column: 1; grid-row: lead / lead-end; margin-inline-end: var(--_led-col-gap); }
|
|
224
|
+
:is(.head, .link-block > .row):has(> .line-ends) > :is(.words__flow, .words) { grid-column: 2 / -1; grid-row: top / top-end; align-self: first baseline; display: block; min-width: 0; }
|
|
225
|
+
:is(.head, .link-block > .row):has(> .line-ends) > .line-ends { grid-column: 3; grid-row: top / top-end; align-self: first baseline; display: flex; align-items: center; padding-inline-start: var(--_led-col-gap); }
|
|
226
|
+
:is(.head, .link-block > .row):has(> .line-ends) > .line-ends::before { content: ""; flex: none; width: 0; height: 1ex; font: var(--_led-title-font); }
|
|
227
|
+
:is(.head, .link-block > .row):has(> .line-ends) > :is(.line-ends, .words__flow > .words__room, .words > .words__room) > * { flex: none; }
|
|
228
|
+
:is(.head, .link-block > .row):has(> .line-ends) > :is(.line-ends, .words__flow > .words__room, .words > .words__room) > * + * { margin-inline-start: var(--_led-col-gap); }
|
|
229
|
+
:is(.head, .link-block > .row):has(> .line-ends) > :is(.words__flow, .words) > .words__room { display: flex; padding-inline-start: var(--_led-col-gap); }
|
|
230
|
+
:is(.head, .link-block > .row):has(> .line-ends) > :is(.words__flow, .words) > :is(.words__title, .words__meta) { display: block; overflow: visible; -webkit-line-clamp: none; line-clamp: none; padding-block: 0; margin-block: 0; clip-path: inset(calc(-1 * var(--glyph-rise)) 0 calc(-1 * var(--glyph-drop))); }
|
|
231
|
+
:is(.head, .link-block > .row):has(> .line-ends) > :is(.words__flow, .words) > .words__title + .words__meta { margin-block-start: var(--_led-gap); } /* the words' gap, and nothing else between them */
|
|
232
|
+
/* the head's: its gaps, its title's type (h2, h1, display; the page's h1 at the card heading's size), and the cuts */
|
|
233
|
+
.head:has(> .line-ends) { --_led-gap: var(--head-row-gap, var(--sp-0)); --_led-col-gap: var(--head-col-gap, var(--sp-3)); --_led-title-font: var(--words-title-font, var(--type-h2)); }
|
|
234
|
+
.head:has(> .line-ends):has(> .words__flow > .t-h1) { --_led-title-font: var(--words-title-font, var(--type-h1)); }
|
|
235
|
+
.head:has(> .line-ends):has(> .words__flow > .t-display) { --_led-title-font: var(--words-title-font, var(--type-display)); }
|
|
236
|
+
.page > .head:has(> .line-ends):has(> .words__flow > h1) > .line-ends::before { font-size: var(--fs-h2); }
|
|
237
|
+
.head:has(> .line-ends) > .words__flow > .words__title { max-height: calc(var(--head-title-lines, 3) * 1lh); }
|
|
238
|
+
.head:has(> .line-ends) > .words__flow > .words__meta { overflow-wrap: anywhere; max-height: calc(var(--head-meta-lines, none) * 1lh); } /* none (the default) leaves the calc invalid: no cut */
|
|
201
239
|
/* no meta: one line beside the lead, the title and the ends centred to it, the title still at the left (Lh 2026-10-28) */
|
|
202
240
|
.head:not(.head--centre):has(> :is(.lead, .avatar, .avatar-stack):first-child + :is(.words__title, .words__over-title)):not(:has(> .words__meta)) { align-items: center; }
|
|
203
241
|
.head:not(.head--centre):has(> :is(.lead, .avatar, .avatar-stack):first-child + :is(.words__title, .words__over-title)) > :nth-child(2) { grid-column: 2; grid-row: 1; }
|
|
@@ -209,8 +247,8 @@
|
|
|
209
247
|
-webkit-line-clamp: var(--head-meta-lines, none);
|
|
210
248
|
line-clamp: var(--head-meta-lines, none);
|
|
211
249
|
overflow: hidden;
|
|
212
|
-
padding-block:
|
|
213
|
-
margin-block: -
|
|
250
|
+
padding-block: var(--glyph-rise) var(--glyph-drop); /* room for a Thai mark inside the clip, given back outside (as the title's, above) */
|
|
251
|
+
margin-block: calc(-1 * var(--glyph-rise)) calc(-1 * var(--glyph-drop));
|
|
214
252
|
}
|
|
215
253
|
.head:not(.head--centre):has(> :is(.lead, .avatar, .avatar-stack):first-child + :is(.words__title, .words__over-title)) > :nth-child(n + 3):not(.words__meta) { grid-row: 1; margin-inline-start: var(--head-col-gap, var(--sp-3)); }
|
|
216
254
|
|
|
@@ -238,7 +276,7 @@
|
|
|
238
276
|
:is(.card--bands, .card--bands > .card__face):has(> .stamp-on--under, > .card__middle > .stamp-on--under) > .head::before { content: ""; position: absolute; inset: 0; z-index: var(--z-under-2); background: var(--card-bg); }
|
|
239
277
|
/* the under stamp is absolute at --card-pad from the card's top, so it takes no room in the head: the band is held at least as tall as the stamp
|
|
240
278
|
(--stamp-size wide, 4 : 5) plus --card-pad above and below it, so a short title never leaves the stamp hanging past the band. Words taller grow it as before */
|
|
241
|
-
:is(.card--bands, .card--bands > .card__face):has(> .stamp-on--under, > .card__middle > .stamp-on--under) > .head { min-block-size: calc(var(--card-pad) * 2 + var(--stamp-size,
|
|
279
|
+
:is(.card--bands, .card--bands > .card__face):has(> .stamp-on--under, > .card__middle > .stamp-on--under) > .head { min-block-size: calc(var(--card-pad) * 2 + var(--stamp-size, var(--stamp)) * 5 / 4); }
|
|
242
280
|
|
|
243
281
|
/* in a sheet stack */
|
|
244
282
|
/* stack headers: uniform — [back?] title left, icons right, one height,
|
|
@@ -465,13 +503,13 @@
|
|
|
465
503
|
whole short row of its own, centred — it never shares the buttons' line */
|
|
466
504
|
.foot--link { flex-wrap: wrap; align-content: end; row-gap: var(--foot-link-gap, var(--sp-1)); }
|
|
467
505
|
.foot__link { flex: 1 0 100%; display: flex; justify-content: center; }
|
|
468
|
-
/* round (Foot round): the foot holds a few round
|
|
506
|
+
/* round (Foot round): the foot holds a few round Btns, each its own size (they never share the line), as ONE group in the middle with
|
|
469
507
|
a gap that does not follow the card's width. The gap is wider than the Btns' (a miss between two round targets): --foot-gap sets it */
|
|
470
508
|
.foot--round { justify-content: center; gap: var(--foot-gap, var(--sp-6)); }
|
|
471
509
|
/* joined (Foot round joined): the round buttons linked by dots (the dots are BtnRow's, actions.css), a closer gap */
|
|
472
510
|
.foot--joined { gap: var(--btn-trio-gap, var(--sp-3)); }
|
|
473
511
|
/* split (Foot split, Lh 2026-10-25): two Btns (or two small Links, below) that ARE the card's foot — each half its width, edge to edge, flush with its bottom edge,
|
|
474
|
-
the card's bottom corners round them. No pill: no fill, no edge, no radius; the words in the ink of the ground they stand on (a `Btn warn`
|
|
512
|
+
the card's bottom corners round them. No pill: no fill, no edge, no radius; the words in the ink of the ground they stand on (a `Btn tone="warn"`
|
|
475
513
|
keeps its warning, on that ground's side). A rule of --rule-w between the halves and over them (the band's own fill is the edge on bands).
|
|
476
514
|
Knob --foot-split-rule-ink. The finishes leave the halves flat (finish.css): the card carries the finish.
|
|
477
515
|
A STRIP, not a button row (Lh 2026-10-25): each half is a status row's height (a row's --row-min-h plus the rows' gap, --sp-2 above
|
package/css/sheet.css
CHANGED
|
@@ -93,7 +93,7 @@
|
|
|
93
93
|
:is(.step, .sheet-stage, .sticky-answer__sheet) { --_handle: var(--hairline-w); --sheet-peek: calc(var(--card-pad-rest) + var(--sheet-head-h) + var(--card-gap-rest) + var(--safe-bottom)); } /* + the gesture bar: the peeked head stands above it. The handle sits IN the card's top padding, so the strip is that padding, the title row and the gap under it */
|
|
94
94
|
/* the head's floor: a tap, or an h2 line with its Thai-mark padding when the type is bigger than that (a large text-size
|
|
95
95
|
setting on a narrow phone) — the strip and the head read the same number, so the title row is always inside the strip */
|
|
96
|
-
:root { --sheet-head-h: max(var(--tap), calc(var(--
|
|
96
|
+
:root { --sheet-head-h: max(var(--tap), calc(var(--lh-h2) * var(--fs-h2) + var(--sp-2))); }
|
|
97
97
|
|
|
98
98
|
/* ---- called sheets (Lh, 2026-09-20): a .step whose .page has buttons that each CALL a sheet ----
|
|
99
99
|
.sheet--away = not on the screen: slid all the way out (translate, like every state — the material never
|