@usableapp/cardds 0.7.178 → 0.7.180
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 +38 -0
- package/bin/cardds.mjs +23 -3
- package/css/actions.css +11 -8
- package/css/base.css +13 -2
- package/css/card.css +39 -7
- package/css/layover.css +25 -16
- package/css/lists.css +58 -4
- package/css/media.css +33 -0
- package/css/parts.css +20 -2
- package/css/stack.css +43 -1
- package/css/tokens.css +4 -1
- package/dist/actions/Btn.d.ts +6 -2
- package/dist/actions/Btn.js +5 -2
- package/dist/cardds.css +246 -41
- package/dist/cards/Card.d.ts +1 -1
- package/dist/cards/Card.js +4 -1
- package/dist/cards/CardParts.d.ts +12 -5
- package/dist/cards/CardParts.js +8 -7
- package/dist/cards/FeedPost.d.ts +31 -0
- package/dist/cards/FeedPost.js +14 -0
- package/dist/catalog.json +1 -1
- package/dist/index.d.ts +4 -0
- package/dist/index.js +4 -0
- package/dist/layover/Popup.d.ts +2 -2
- package/dist/layover/Popup.js +1 -1
- package/dist/lists/Bubble.d.ts +25 -6
- package/dist/lists/Bubble.js +17 -8
- package/dist/lists/Row.d.ts +11 -2
- package/dist/lists/Row.js +4 -3
- package/dist/media/Mosaic.d.ts +4 -3
- package/dist/media/Mosaic.js +8 -4
- package/dist/media/Thumb.d.ts +14 -0
- package/dist/media/Thumb.js +12 -0
- package/dist/parts/Foot.d.ts +7 -2
- package/dist/parts/Foot.js +4 -3
- package/dist/parts/Head.d.ts +3 -1
- package/dist/parts/Head.js +3 -1
- package/dist/scaffold/Centre.d.ts +1 -1
- package/dist/scaffold/Centre.js +1 -1
- package/dist/scaffold/Panes.d.ts +1 -0
- package/dist/scaffold/Panes.js +1 -0
- package/dist/sheets/Modal.d.ts +1 -1
- package/dist/sheets/Modal.js +1 -1
- package/dist/sheets/SheetStack.d.ts +3 -1
- package/dist/sheets/SheetStack.js +2 -1
- package/dist/sheets/StackSheet.d.ts +6 -4
- package/dist/sheets/StackSheet.js +8 -3
- package/dist/sheets/stackCard.d.ts +2 -0
- package/dist/templates/Home.d.ts +3 -1
- package/dist/templates/Home.js +2 -2
- package/dist/templates/Splash.d.ts +1 -1
- package/dist/templates/Splash.js +1 -1
- package/dist/type/Icon.js +1 -1
- package/dist/type/Phrase.d.ts +9 -0
- package/dist/type/Phrase.js +11 -0
- package/dist/type/Strong.d.ts +7 -0
- package/dist/type/Strong.js +9 -0
- package/dist/type/Text.d.ts +5 -1
- package/dist/type/Text.js +7 -3
- package/dist/type/icons.d.ts +1 -1
- package/dist/type/icons.js +2 -2
- package/docs/reference.md +121 -8
- package/icons.svg +1 -0
- package/lib/audit.mjs +330 -0
- package/lib/guide.mjs +1 -1
- package/lib/mcp.mjs +13 -0
- package/lint/rules.mjs +2 -2
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -6,6 +6,44 @@
|
|
|
6
6
|
|
|
7
7
|
## ยังไม่ปล่อย
|
|
8
8
|
|
|
9
|
+
## 0.7.180 — 2026-11-26
|
|
10
|
+
|
|
11
|
+
Components: AddRow, Avatar, AvatarPick, AvatarPickItem, AvatarStack, Banner, Body, Btn, BtnGroup, BtnGroupItem, BtnRow, Bubble, Calendar, CalendarWeeks, CallSheet, Callout, Card, CardArt, CardFeed, CardGrid, CardList, CardMedia, Centre, Chip, ChipChoice, ChipGrid, ChipPick, ChipRow, Composer, ComposerArea, Countdown, Dropdown, EmptyState, Fab, FeedCard, FeedEnd, FeedPost, Field, FileBtn, Foot, Head, Home, Icon, IconRow, JourneyBadge, Kv, KvCell, KvGrid, KvRow, Lead, Link, LinkBlock, MapArea, MapPick, MediaBeside, Menu, MenuItem, MessageBar, Modal, ModalAsk, Mosaic, NoteRow, NoteRows, NumberBand, NumberBandStack, Pager, Pages, Pane, Panes, Pin, Popup, PostBox, PostBoxCard, PostDesk, PostDeskLine, PostLetter, Postcard, Postmark, Ring, Route, Row, Rows, Screen, Sheet, SheetStack, SheetStep, SheetSteps, Snackbar, Spinner, Splash, StackBack, StackSheet, Stamp, StampBook, StampCell, StampOn, StampPlace, Step, Sticky, StickyAnswer, StickyPost, StickyThread, Text, Thread, Tile, TileGrid, Walkthrough, Was, Wave, Words
|
|
12
|
+
|
|
13
|
+
### Changed
|
|
14
|
+
- **`StackSheet` tabs show their name under the icon; `tabLabels`** (cardds#236, cardds#237): before, every tab of a `StackSheet` head was a round icon `Btn`, its `label` only read aloud, so people could not tell what an icon meant. After: each tab is the icon over its `label` in one line of the caption type (`--fs-2xs`, normal letter width, never wrapped); the chosen tab, while its sheet is open, is a rounded frame round icon and name (`--stack-sheet-tab-radius`, default `--sp-4`), the others the card's muted ink; a `count` sits at the icon's top right and pushes nothing; the tabs stand `--stack-sheet-tabs-named-gap` (default `--sp-3`) apart, a finger's room. `--stack-step` grows by `--sp-6` so a peeking head shows the names (not in `--display` or `--fanned` stacks). `role="tab"`, `aria-selected` and the spoken name (`label` with the count) are as before. `tabLabels={false}` on `StackSheet`, `SheetStack` or `Home` is the old look: icon buttons alone, `--sp-6` apart, the old `--stack-step`; a sheet's own `tabLabels` wins over the stack's. Stories `SheetStack · TabNamesHome` · `TabNamesNeighbour` · `TabNamesHelp` · `TabNamesOff`; every `Home` story and `FrameScreens · HomeFrame` shift.
|
|
15
|
+
|
|
16
|
+
## 0.7.179 — 2026-11-19
|
|
17
|
+
|
|
18
|
+
A notification can be one line of words, a `Bubble` can quote the message it answers, a `Mosaic` takes 2 to 10 photos, a centred box stands by its own 40% point, and `Thumb` is new.
|
|
19
|
+
|
|
20
|
+
Components: all
|
|
21
|
+
|
|
22
|
+
### Added
|
|
23
|
+
- **`Mosaic` of 2 to 10 photos, `CardMedia full`, `Panes` as a photo slide show** (cardds#226): before, `Mosaic` took exactly three photos (one big left, two small right), a rounded full-width picture stood only inside a card (on a full screen an app put a bare `Placeholder` or `img`), and `Panes` was written for "a few panes" of a card or a sheet. After: `<Mosaic>` takes 2 photos (side by side, equally tall), 3 (as before, unchanged) or 4 to 10 (the first three as before, the small lower one darkened with `+n`, n the photos not shown; the others are not drawn; the scrim twice so the number holds AA over any photo; knobs `--mosaic-more-bg`, `--mosaic-more-ink`, `--mosaic-more-font`); `<CardMedia full>` is the rounded full-width picture outside a card, in a `Page`: corner `--r-media`, the picture's own ratio, one taller than `--card-media-max-ratio` (height ÷ width, default 1.25, 4:5) cut at its middle; `<Panes>` in a `Page` with a `<Pane><CardMedia full>…</CardMedia></Pane>` per photo is a slide show of up to 10, the dots on one line at 375px (no code change in `Panes`; its JSDoc and the reference say so). Stories `Mosaic · Two` · `Three` · `Seven`, `CardMedia · FullInAPage`, `Panes · PhotoSlides`; `Mosaic · Alone` and the other existing stories unchanged.
|
|
24
|
+
- **A notification of one line of words: `Row leadLines`, `Strong`, `Text corner`** (cardds#229): before, a notification made of one `Text caption` could not be built from cardds: a `Row` lead had one size (`--stamp-sm-size` / `--lead-size`, one tap), so a stamp could not stand as tall as three lines of words; words could not be made heavy inside a text (an app cannot write its own `<strong>`); a time put as the `End` of a `Row` took a whole column from the words. After: `<Row leadLines={3} leadText="caption" unread><AvatarStack><Stamp bare … /></AvatarStack><Text level="caption" lines={3} corner="5 min" grow><Strong>Auntie Sri</Strong> • thank you for…</Text></Row>`. `Row leadLines` (1 to 3; `leadText` `body` (default) or `caption`): the lead is as tall as that many lines of the level's line height, a `Stamp` at its 4:5 shape, a `Lead` a square as wide as that stamp, in the middle; no px. `Strong`: weight `--strong-weight` (default `--fw-bold`), size, ink and line the text's. `Text corner`: one short word at the top end in the muted ink (`--text-corner-ink`) at the text's size, `--text-corner-gap` (`--sp-2`) from the words; the first line runs round it, the rest is full width, and with `lines` the cut counts the visible lines only. Stories `Row · Notifications`, `Row · LeadLines`, `Strong`, `Text · CornerWord`, `Text · CornerOneLine`.
|
|
25
|
+
- **`Thumb` and `ThumbGrid`** (cardds#232): before, a post desk showing the photos a member had added used a `Lead` holding an image icon with `--lead-size` set by the app (`Lead` is a box for an icon, `Avatar` is round, `Placeholder` a tall box), and had no way to lay them five to a row. After: `<ThumbGrid><Thumb src={url} label="Photo 1, tap to remove" onClick={ask} />…</ThumbGrid>`. A `Thumb` is one small square photo that is a button: only the photo (`object-fit: cover`), corner `--thumb-radius` (default `--r-control`), no words, the whole square pressed (`label` = its accessible name, `onClick` the app's), the tile's give and the focus ring; without `src` it holds a `Placeholder`'s crossed box. A `ThumbGrid` is `--thumb-grid-cols` (default 5) squares to a row, as wide as the box it stands in, `--thumb-grid-gap` (default `--sp-2`) apart: ten photos are two rows, and in a `Modal` at 375px each is over `--tap-sm`. Stories `Thumb · Default`, `ThreeInAModal`, `TenInAModal`; no existing story changes.
|
|
26
|
+
- **`Bubble quote`** (cardds#227): before, a bubble answering another message had nowhere for the line of the message answered; the app put a `Text caption muted lines={1}` inside it, with no rule at its start. After: `<Bubble quote="Noi: Could I have a cutting?">Yes, I am home all day</Bubble>` puts that line at the top inside the bubble, over the words: one line cut with "…", a rule at its start like a `MessageBar`'s `quote`, `caption` size, in the muted ink of the bubble's ground (a theirs and a mine bubble alike). `onClick`, `href` and `highlighted` work as before and take the line with them. Knobs `--bubble-quote-ink`, `--bubble-quote-rule-ink` (default `var(--card-muted)`). A mine bubble now declares its fill's side (`--dark: var(--accent-dark)`), so what reads the ground's side inside it (`--card-muted`, `--card-ink`, `--accent-ink`, the signals) follows the accent's side, as it did not before; its words keep `--on-accent`. Story `Bubble · Quote`; existing stories unchanged.
|
|
27
|
+
- **`FeedPost`, `CardList thin`, a done `Btn` (`aria-disabled`)** (cardds#213): before, a post in a feed was built by hand from `Card` + `Head` + `MediaBeside` + `Foot` and three `Btn`s: a post stood about 255px tall on a 390 × 844 phone (padding 20, corner 41.6, gap 20 — the card knobs live on `:root`, so a feed could not be thinner alone), the photo was a 72px square beside the words, and the like / comment / pass-on row was three framed buttons across the card. After, all three are opt-in and every existing screen is unchanged:
|
|
28
|
+
- `<CardList thin>`: every `Card` in the list — posts and plain cards alike — has padding `--sp-4`, corner `--r-base`, its parts `--sp-5` apart; the cards stay `--card-list-gap` (`--sp-3`) apart. A card outside the list, and a `Thread` between its cards, do not change. Knobs `--card-list-thin-pad`, `--card-list-thin-gap`, `--card-list-thin-radius`.
|
|
29
|
+
- `<FeedPost lead={<Avatar>…</Avatar>} author="Somsri" time="40 min" via="Ton passed it on" end={<Btn shape="round" size="sm" icon="flag" label="Report" />} media={<img …/>} actions={<BtnGroup …/>} onPress={open} pressLabel="Open the post"><Text level="body" expand>…</Text></FeedPost>`: one post, a card of its own — the author bold and ` · time` small on one line, `via` under them (head lines `--sp-1` apart), the words, the picture FULL WIDTH at its own shape (no taller than `--feed-post-media-ratio`, default `4 / 3`, a taller one cut in its middle; `4 / 5` on a sheet), the moves; parts `--sp-5` apart (`--feed-post-gap`); `end` is the `Head`'s end (the member's own post has none); pressed whole with `onPress` while its buttons keep their own press.
|
|
30
|
+
- The moves are the existing `BtnGroup` frame: a round `Btn` per share, an icon and the number as its child word (none at 0), `select="many"` + `value` for the liked share (filled), no `value` for a plain command. New: `<Btn aria-disabled>` is a move done already — it fades (`--off`), takes no give and no dim, never calls `onClick` and never switches a `BtnGroup`'s `value`, but stays focusable and read (before, `aria-disabled` on a `Btn` faded it and blocked the give, yet `onClick` still ran and a frame's share still dimmed under the finger). A move done STAYS in `value` with `aria-disabled` (Lh 2026-11-18): the share is the pressed fill, faded.
|
|
31
|
+
- A `flag` icon joins the stock set (Lucide's): the report flag at a post's head, `<Btn shape="round" size="sm" icon="flag" label="Report" />` — before, a project registered its own with `registerIcons`.
|
|
32
|
+
Stories `FeedPost · Feed`, `Words`, `Photo`, `TallPhoto`, `PassedOn`, `BtnGroup · PostRow`, `PostRowControlled`; existing stories unchanged.
|
|
33
|
+
- **`Row todo` and `Row done fullInk`** (cardds#223): before, a checklist built from `Row`s showed the finished lines with a tick and faded words, and the lines still to do with nothing where the tick goes, so they looked like plain rows: nobody saw they could be pressed, and the weight was upside down (done faded, open dark). After, `<Row todo as="a" href="…">` draws an empty dashed circle where the tick would be (the same size, `--row-done-size`) and fades its title and second line (`--row-todo-ink`, default 40% of the card's ink; the ring `--row-todo-ring`); the whole row is the press target, and the app's words name it for a screen reader. `<Row done fullInk>` keeps the card's ink beside the tick, so the finished lines stand out against the faded ones; a `done` row without `fullInk` is as before. Stories `Row · Todo`, `Row · Controlled`.
|
|
34
|
+
- **`Phrase`** (cardds#224): before, Thai words after a `Chip` in a sentence were cut wherever the line ran out (a `ModalAsk` caption read "…ของเพื่อนบ้านทุก" then "คน" alone on the next line), and a project wrote its own `white-space: nowrap`. After, `<Phrase>ของเพื่อนบ้านทุกคน</Phrase>` keeps its words on one line: the line breaks before it or after it, never inside. Inline, in any `Text` level, a `ModalAsk` `caption` and beside a `Chip`; a phrase longer than the room it has breaks inside itself, never out of its box. Story `Modal · PhraseAfterChip`.
|
|
35
|
+
- **`Bubble metaAbove` / `lead` / `action`, `Thread` room in a feed, `Foot layer`** (cardds#214): before, a `Bubble` could only put its caption (`author`, `day`, `meta`) UNDER the message, so a list of comments from several people was read message first and writer after; a right-hand (own) bubble had no place for its time over it or for a button beside it; a `Thread` standing alone between cards in a feed had only the cards' gap (the bubble crowded its neighbour card, the room piled up under it); and a sheet's foot (a `MessageBar` under comments) was the sheet's own colour, the same as the comments scrolling behind it, with no knob for another. After, all three are opt-in and every existing screen is unchanged:
|
|
36
|
+
- `<Bubble metaAbove author lead={<AvatarStack><Stamp bare … /></AvatarStack>} meta="35 min">`: the caption line stands over the message on one line — `lead` (the picture, at its own size) · `author` in bold · "·" · the time small; the bubble under it from the start edge, as wide as its words up to `--bubble-max-w`, `--sp-2` below the line. The name is cut with "…" before the line wraps. `lead` and `author` show where the Thread's `authors` says (`authors="every"` for a comment list). Mine (`side="right"`): the time alone, over the bubble at the right. Knobs `--bubble-meta-above-gap`, `--bubble-lead-gap`, `--bubble-author-font`, `--bubble-author-ink`. Without `metaAbove` nothing moves.
|
|
37
|
+
- `<Bubble side="right" metaAbove meta="12 min" action={<Btn shape="round" size="sm" icon="trash" label="Delete" />}>`: one round `Btn` of the app beside the message, centred on its height — after a left bubble, before a right one — inside the same 75% cap; knob `--bubble-action-gap` (`--sp-2`). Not with `href` or `onClick` (a button in a link): ignored, with a warning; use a `Row` there.
|
|
38
|
+
- A `Thread` that is a direct child of a `CardList` has the same room over it and under it, `--thread-room-size` (default `--sp-4`); before it had only the list's gap over it and `--thread-end-size` under it. A `Thread` anywhere else is as before; pass `jumpLabel={false}` in a feed.
|
|
39
|
+
- `<Foot layer>` in a `Sheet`: the foot's strip gets a ground of its own, edge to edge, a rule over it — the sheet's colour a little darker (`--foot-layer-bg`, default 8% of the dark ink over `--card-bg`; `--foot-layer-rule-ink`, default `--hairline`). The strip is the same size, so the body still stops above it, and a `MessageBar`'s box on it is still the paper. A `Foot` without `layer` is as before.
|
|
40
|
+
Stories `Bubble · Comments`, `Bubble · InFeed`; existing stories unchanged.
|
|
41
|
+
|
|
42
|
+
### Changed
|
|
43
|
+
- **The line under a `Rows joined` row is thinner and fainter** (cardds#229, Lh 2026-11-18: "the dark line is too strong"): before, a border of `--border-w` (1.5) at `--hairline` (18% of the ink); after, `--rows-joined-border-w` (new knob, default `--px`, 1) at `--rows-joined-border` (default the new token `--hairline-soft`, 10% of the ink), about half as strong. A project that set `--rows-joined-border` keeps its colour; `--rows-joined-border-w: var(--border-w)` and `--rows-joined-border: var(--hairline)` are the old look. Every `Popup` and every `Rows joined` story shifts.
|
|
44
|
+
- **A centred box stands by its own 40% point** (cardds#231, Lh 2026-11-18): before, `Modal` stood with its MIDDLE at 50% of the stage, and `Card centre`, `Centre` on a `Screen fill` and the `Splash` group had their middle (50% of the box) on `--screen-centre` (40% of the screen): all four sat lower than the rule "the point 40% down the card is on the point 40% down the screen". After: the box's own 40% point is on `--screen-centre` in all four (`top: var(--screen-centre)` and `translate: 0 var(--centre-lift)`), so a `Card centre`, a `Centre` and a `Splash` group sit a tenth of their height LOWER than before (a box of 300: 30 lower) and a `Modal` sits higher (its middle goes from 50% of the stage to 40% plus a tenth of its height). New tokens `--centre-at` (0.4, the one number: `--screen-centre` is `calc(var(--centre-at) * 100%)`) and `--centre-lift` (`calc(-1 * var(--screen-centre))`). The `Modal` keeps that point while it drops in and while its drawer comes out (the box grows about it). The cap of each is now the room above the line / 0.4 or the room below it (`--bar-reserve`) / 0.6, whichever is less (the `Modal`'s was the stage less `--sp-5` on each side; it now also stays under a top bar, `--_top`): a taller box scrolls its `Body` (a `Modal`) or itself (the others); a `Modal`'s drawer keeps its height. A project's `--screen-centre: 45%` becomes `--centre-at: 0.45`. Story `Modal · TallUnderTopBar`; every `Modal`, `Card centre`, `Centre` and `Splash` story shifts.
|
|
45
|
+
- **`Popup` stands narrower than the cards under it** (cardds#222): before, a popup stood `--popup-margin` (`--sp-3`, 12) in from the screen's edge on both sides, wider than the cards of the page (16 in), so it read as one sheet with the card under it. After, it stands `--sp-2` in from the card's edge on the button's side and `--sp-6` in on the far side, so the card's edge shows on both (375 wide, `end`: popup x 40–351 over cards at 16–359; without `end` the mirror), anchored to the button or hung under the top bar (iOS before 26) alike; it is still at most `--popup-w` wide on a wider screen. A project that sets `--popup-margin` gets that one value for both distances (anchored, it now also moves the near edge that many in from the button's edge, where before it only limited the width); the margin under the popup is unchanged. Only the `Popup` stories change.
|
|
46
|
+
|
|
9
47
|
## 0.7.178 — 2026-11-17
|
|
10
48
|
|
|
11
49
|
`Popup` (a panel under a button) is new, a `Row` can be `unread`, `Rows` can be `joined`, and a `Lead` takes a `tone`.
|
package/bin/cardds.mjs
CHANGED
|
@@ -6,11 +6,12 @@
|
|
|
6
6
|
// `npx cardds codemod-head [--check] <files or folders…>` — rewrite every Head written with children to its variant and slots (scripts/codemod-head.mjs).
|
|
7
7
|
// `npx cardds list | get <Name> | find [words…] [--represents a,b] [--shape s] [--interact k|none] | scaffold [id]` — the component catalog (lib/catalog.mjs) for an AI session; `npx cardds mcp` serves the same over MCP.
|
|
8
8
|
import { existsSync, readFileSync, readdirSync, statSync, mkdirSync, copyFileSync } from 'node:fs';
|
|
9
|
-
import { dirname, join, relative, resolve } from 'node:path';
|
|
9
|
+
import { basename, dirname, join, relative, resolve } from 'node:path';
|
|
10
10
|
import { fileURLToPath } from 'node:url';
|
|
11
11
|
import { checkSource } from '../lint/rules.mjs';
|
|
12
12
|
import * as catalog from '../lib/catalog.mjs';
|
|
13
13
|
import { GUIDE } from '../lib/guide.mjs';
|
|
14
|
+
import * as screens from '../lib/audit.mjs';
|
|
14
15
|
|
|
15
16
|
const PKG = join(dirname(fileURLToPath(import.meta.url)), '..');
|
|
16
17
|
const [cmd, ...args] = process.argv.slice(2);
|
|
@@ -154,7 +155,26 @@ function ask(cmd, argv) {
|
|
|
154
155
|
return 0;
|
|
155
156
|
}
|
|
156
157
|
|
|
158
|
+
const auditAsText = {
|
|
159
|
+
questions: (rules) => rules.flatMap((rule) => [`${rule.rule} ${rule.name}`, ...rule.questions.map((question) => ` - ${question}`)]).join('\n'),
|
|
160
|
+
items: (items, pages) => (items.length
|
|
161
|
+
? items.map((item) => `rule ${item.rule} ${item.page ? `[${item.page}] ` : ''}${item.where}\n ${item.says}`).join('\n')
|
|
162
|
+
: `cardds audit: clean (${pages} page${pages === 1 ? '' : 's'} read)`),
|
|
163
|
+
};
|
|
164
|
+
|
|
165
|
+
function auditFiles(argv) {
|
|
166
|
+
const json = argv.includes('--json');
|
|
167
|
+
const files = argv.filter((arg) => arg !== '--json');
|
|
168
|
+
const missing = files.filter((file) => !existsSync(resolve(cwd, file)) || !statSync(resolve(cwd, file)).isFile());
|
|
169
|
+
if (missing.length) { for (const file of missing) console.error(`cardds audit: ${file}: no such file — \`npx cardds audit <file.html …>\``); return 2; }
|
|
170
|
+
const pages = files.map((file) => ({ name: basename(file), html: readFileSync(resolve(cwd, file), 'utf8') }));
|
|
171
|
+
const result = pages.length === 0 ? screens.audit() : pages.length === 1 ? screens.audit({ html: pages[0].html }) : screens.audit({ pages });
|
|
172
|
+
if (json) console.log(JSON.stringify(result));
|
|
173
|
+
else console.log(pages.length === 0 ? auditAsText.questions(result) : auditAsText.items(result, pages.length));
|
|
174
|
+
return pages.length && result.length ? 1 : 0;
|
|
175
|
+
}
|
|
176
|
+
|
|
157
177
|
const codemod = (which, a) => import(`../scripts/${which}.mjs`).then((m) => m.main(a), (e) => { console.error(`cardds ${which}: ${e.code === 'ERR_MODULE_NOT_FOUND' ? 'it reads the TypeScript compiler: install `typescript` in the project' : e.message}`); return 2; });
|
|
158
|
-
const code = cmd === 'check' ? check(args) : cmd === 'codemod-parts' || cmd === 'codemod-head' ? await codemod(cmd, args) : cmd === 'init' ? init() : cmd === 'guide' ? (process.stdout.write(GUIDE), 0) : ['list', 'get', 'find', 'scaffold', 'mcp'].includes(cmd) ? await ask(cmd, args)
|
|
159
|
-
: (console.log('usage: cardds init | guide | check [dir…] | codemod-parts [--check] <files…> | codemod-head [--check] <files or folders…> | list | get <Name> [--html] | find [words…] [--represents a,b] [--shape s] [--interact k|none] | scaffold [id] [--html [--css <href>]] | mcp (list get find scaffold mcp: --root <path> --json)'), cmd ? 2 : 0);
|
|
178
|
+
const code = cmd === 'check' ? check(args) : cmd === 'audit' ? auditFiles(args) : cmd === 'codemod-parts' || cmd === 'codemod-head' ? await codemod(cmd, args) : cmd === 'init' ? init() : cmd === 'guide' ? (process.stdout.write(GUIDE), 0) : ['list', 'get', 'find', 'scaffold', 'mcp'].includes(cmd) ? await ask(cmd, args)
|
|
179
|
+
: (console.log('usage: cardds init | guide | check [dir…] | audit [--json] [file.html…] | codemod-parts [--check] <files…> | codemod-head [--check] <files or folders…> | list | get <Name> [--html] | find [words…] [--represents a,b] [--shape s] [--interact k|none] | scaffold [id] [--html [--css <href>]] | mcp (list get find scaffold mcp: --root <path> --json)'), cmd ? 2 : 0);
|
|
160
180
|
process.exitCode = code; // not process.exit: a big answer piped to a reader is cut off by an exit before it is flushed
|
package/css/actions.css
CHANGED
|
@@ -135,7 +135,9 @@
|
|
|
135
135
|
.icon-btn-line__words { font: var(--type-label); text-align: center; min-width: 0; }
|
|
136
136
|
.icon-btn-line > .icon-btn-group--form { margin-inline: 0; }
|
|
137
137
|
.icon-btn-group > .icon-btn[aria-pressed="true"] { background: var(--icon-btn-group-on-bg, var(--accent)); color: var(--icon-btn-group-on-ink, var(--on-accent)); } /* `select`: a pressed button STAYS filled (Lh 2026-09-29) */
|
|
138
|
-
.icon-btn-group > .icon-btn:active:not(:disabled) { scale: 1; opacity: var(--press-dim); } /* a part of one frame DIMS, it never shrinks inside it */
|
|
138
|
+
.icon-btn-group > .icon-btn:active:not(:disabled, [aria-disabled="true"]) { scale: 1; opacity: var(--press-dim); } /* a part of one frame DIMS, it never shrinks inside it */
|
|
139
|
+
/* a share DONE ALREADY (`Btn aria-disabled`, cardds#213: a post passed on) fades with the press list's `--off` and takes no dim; pressed and done (its
|
|
140
|
+
value still on) it is the pressed fill, faded */
|
|
139
141
|
|
|
140
142
|
/* fab: the square floating action, bottom-right of a stage or screen */
|
|
141
143
|
.fab { width: var(--fab); height: var(--fab); border-radius: var(--r-card); position: absolute; right: var(--sp-4); bottom: calc(var(--sp-5) + var(--bar-h) + var(--sp-3) + var(--safe-bottom)); box-shadow: var(--shadow-float); z-index: var(--z-fab); }
|
|
@@ -500,18 +502,19 @@
|
|
|
500
502
|
dims only when the finger is on the card itself, never while it is on one of those.
|
|
501
503
|
.t-expand--more (Lh 2026-10-25) = a `Text expand` that does not fit: the whole box opens or folds. It is WORDS, so it neither
|
|
502
504
|
dims nor gives: its ink never changes under the finger (Lh 2026-10-25), the opening is the answer. Pointer only (below).
|
|
505
|
+
.thumb (cardds#232) = a `Thumb`, a small square photo that is a button: it GIVES (scale) like a tile, and has the focus ring.
|
|
503
506
|
.bubble--press (Lh 2026-10-28) = a chat `Bubble` that is a link (`href`) or pressed (`onClick`): a message is as wide as a row, so it DIMS.
|
|
504
507
|
.link-block (Lh 2026-10-28) = a `LinkBlock`, a few pieces of a card's content as one link: as wide as the card, it DIMS.
|
|
505
508
|
.card--folds > .head (Lh 2026-10-29) = the head of a `Card folds`: a tap opens or folds the card, so it DIMS (pointer and :active only —
|
|
506
509
|
the focus ring is the card's, from its unseen open button, card.css). A control in the head keeps its own press. */
|
|
507
510
|
:where(.btn, .icon-btn, .link, a.chip, button.chip, .chip--pick, a.tile, button.tile, .tile--pick, .day, .segment__item, .calendar__day, .calendar__pick,
|
|
508
511
|
.float-bar__item, .avatar-pick__item, .add-row, .picker__item, .dropdown__btn, .appbar__who, .check, .toggle, .mood__opt, .sheet__handle,
|
|
509
|
-
a.avatar, button.avatar, .menu__item, button.snackbar__body, .stamp--tap, button.stamp-cell, button.stamp-place, .post-letter__turn, .post-desk__slot, .post-desk__pick, .post-desk__reach, .stamp-on__remove, .map-pick, .count-in__cancel) {
|
|
512
|
+
a.avatar, button.avatar, .menu__item, button.snackbar__body, .stamp--tap, button.stamp-cell, button.stamp-place, .post-letter__turn, .post-desk__slot, .post-desk__pick, .post-desk__reach, .stamp-on__remove, .map-pick, .count-in__cancel, .thumb) {
|
|
510
513
|
cursor: pointer;
|
|
511
514
|
touch-action: manipulation;
|
|
512
515
|
transition: scale var(--motion-press) var(--ease-out);
|
|
513
516
|
}
|
|
514
|
-
:where(a.row, button.row, label.row, .row-expand > summary, .banner__summary, a.card, label.card, .card--go, .card--press, .feed-card--small, .card--folds > .head, .toggle-field, .post-box__edge, .bubble--press, .link-block) {
|
|
517
|
+
:where(a.row, button.row, label.row, .row-expand > summary, .banner__summary, a.card, label.card, .card--go, .card--press, .feed-card--small, .card--folds > .head, .toggle-field, .post-box__edge, .bubble--press, .link-block, .row--todo) {
|
|
515
518
|
cursor: pointer;
|
|
516
519
|
touch-action: manipulation;
|
|
517
520
|
transition: opacity var(--motion-press) var(--ease-out);
|
|
@@ -526,8 +529,8 @@
|
|
|
526
529
|
}
|
|
527
530
|
:where(.btn, .icon-btn, .link, a.chip, button.chip, .chip--pick, a.tile, button.tile, .tile--pick, .day, .segment__item, .calendar__day, .calendar__pick,
|
|
528
531
|
.float-bar__item, .avatar-pick__item, .add-row, .picker__item, .dropdown__btn, .appbar__who, .check, .toggle, .mood__opt, .sheet__handle,
|
|
529
|
-
a.avatar, button.avatar, .menu__item, button.snackbar__body, .stamp--tap, button.stamp-cell, button.stamp-place, .post-letter__turn, .post-desk__slot, .post-desk__pick, .post-desk__reach, .stamp-on__remove, .map-pick):active:not(:disabled, [aria-disabled="true"], :has(:disabled)) { scale: var(--press-scale); }
|
|
530
|
-
:where(a.row, button.row, label.row, .row-expand > summary, .banner__summary, a.card, label.card, .card--go, .card--press, .feed-card--small, .card--folds > .head, .toggle-field, .post-box__edge, .bubble--press, .link-block):active:not([aria-disabled="true"], :has(:disabled)) { opacity: var(--press-dim); }
|
|
532
|
+
a.avatar, button.avatar, .menu__item, button.snackbar__body, .stamp--tap, button.stamp-cell, button.stamp-place, .post-letter__turn, .post-desk__slot, .post-desk__pick, .post-desk__reach, .stamp-on__remove, .map-pick, .thumb):active:not(:disabled, [aria-disabled="true"], :has(:disabled)) { scale: var(--press-scale); }
|
|
533
|
+
:where(a.row, button.row, label.row, .row-expand > summary, .banner__summary, a.card, label.card, .card--go, .card--press, .feed-card--small, .card--folds > .head, .toggle-field, .post-box__edge, .bubble--press, .link-block, .row--todo):active:not([aria-disabled="true"], :has(:disabled)) { opacity: var(--press-dim); }
|
|
531
534
|
.card--press:active:has(:is(a[href], button, [role=button], input, select, textarea, summary):active) { opacity: 1; } /* the finger is on a link or a button inside: that one answers, the card stays */
|
|
532
535
|
.card--folds > .head:active:has(:is(a[href], button, [role=button], input, select, textarea, summary):active) { opacity: 1; } /* a button in a folding card's head answers itself, the head stays */
|
|
533
536
|
/* SHADE — what has something BEHIND it (a peeked sheet over the pile, a postcard's face over its back, a post letter's sheet over the other) must not turn see-through:
|
|
@@ -537,17 +540,17 @@
|
|
|
537
540
|
/* the focus ring: on the control, or on the label that wraps a hidden input (chip, tile, file button, a row that is a label, a card that is a label round its radio) */
|
|
538
541
|
:where(.btn, .icon-btn, .link, a.chip, button.chip, .chip--pick, a.tile, button.tile, .tile--pick, .day, .segment__item, .calendar__day, .calendar__pick,
|
|
539
542
|
.float-bar__item, .avatar-pick__item, .add-row, .picker__item, .dropdown__btn, .appbar__who, .check, .toggle, .mood__opt, .sheet__handle,
|
|
540
|
-
a.avatar, button.avatar, .menu__item, button.snackbar__body, .stamp--tap, button.stamp-cell, button.stamp-place, .post-letter__turn, .post-desk__slot, .post-desk__pick, .post-desk__reach, .stamp-on__remove):focus-visible,
|
|
543
|
+
a.avatar, button.avatar, .menu__item, button.snackbar__body, .stamp--tap, button.stamp-cell, button.stamp-place, .post-letter__turn, .post-desk__slot, .post-desk__pick, .post-desk__reach, .stamp-on__remove, .thumb):focus-visible,
|
|
541
544
|
:where(.chip--pick, .tile--pick, label.btn, label.row, .toggle-field):has(:focus-visible), :where(label.card:has(> input[type="radio"]:focus-visible)) { outline: var(--focus); outline-offset: var(--sp-1); }
|
|
542
545
|
:where(a.row, button.row, label.row, .row-expand > summary, .banner__summary, a.card, label.card, .feed-card--small, .toggle-field, .post-box__edge, .t-expand--more, .bubble--press, .link-block):not(label, .toggle-field):focus-visible { outline: var(--focus); outline-offset: var(--sp-1); }
|
|
543
546
|
/* disabled: no pointer anywhere; a control fades (a link and a row keep their own muted look) */
|
|
544
547
|
:where(.btn, .icon-btn, .link, a.chip, button.chip, .chip--pick, a.tile, button.tile, .tile--pick, .day, .segment__item, .calendar__day, .calendar__pick,
|
|
545
548
|
.float-bar__item, .avatar-pick__item, .add-row, .picker__item, .dropdown__btn, .appbar__who, .check, .toggle, .mood__opt, .sheet__handle,
|
|
546
|
-
a.avatar, button.avatar, .menu__item, button.snackbar__body, .stamp--tap, button.stamp-cell, button.stamp-place, .post-letter__turn, .post-desk__slot, .post-desk__pick, .post-desk__reach, .stamp-on__remove, a.row, button.row, label.row, .row-expand > summary, .banner__summary, a.card, label.card, .toggle-field, .post-box__edge):is(:disabled, [aria-disabled="true"]),
|
|
549
|
+
a.avatar, button.avatar, .menu__item, button.snackbar__body, .stamp--tap, button.stamp-cell, button.stamp-place, .post-letter__turn, .post-desk__slot, .post-desk__pick, .post-desk__reach, .stamp-on__remove, .thumb, a.row, button.row, label.row, .row-expand > summary, .banner__summary, a.card, label.card, .toggle-field, .post-box__edge):is(:disabled, [aria-disabled="true"]),
|
|
547
550
|
:where(.chip--pick, .tile--pick, .mood__opt, .toggle-field, label.btn, label.row):has(:disabled) { cursor: default; }
|
|
548
551
|
:where(.btn, .icon-btn, .link, a.chip, button.chip, .chip--pick, a.tile, button.tile, .tile--pick, .day, .segment__item, .calendar__day, .calendar__pick,
|
|
549
552
|
.float-bar__item, .avatar-pick__item, .add-row, .picker__item, .dropdown__btn, .appbar__who, .check, .toggle, .mood__opt, .sheet__handle,
|
|
550
|
-
a.avatar, button.avatar, .menu__item, button.snackbar__body, .stamp--tap, button.stamp-cell, button.stamp-place, .post-letter__turn, .post-desk__slot, .post-desk__pick, .post-desk__reach, .stamp-on__remove):not(.link):is(:disabled, [aria-disabled="true"]),
|
|
553
|
+
a.avatar, button.avatar, .menu__item, button.snackbar__body, .stamp--tap, button.stamp-cell, button.stamp-place, .post-letter__turn, .post-desk__slot, .post-desk__pick, .post-desk__reach, .stamp-on__remove, .thumb):not(.link):is(:disabled, [aria-disabled="true"]),
|
|
551
554
|
:where(.chip--pick, .tile--pick, .mood__opt, .toggle-field, label.btn):has(:disabled) { opacity: var(--off); }
|
|
552
555
|
.sheet-stack--tap > .card > .head > :is(h1, h2, h3):focus-visible { outline: var(--focus); outline-offset: var(--sp-1); } /* the keyboard's way into a stack sheet */
|
|
553
556
|
@media (prefers-reduced-motion: reduce) { :root { --press-scale: 1; } } /* the give goes; the dim, the shade and the focus ring stay */
|
package/css/base.css
CHANGED
|
@@ -188,6 +188,14 @@ button:enabled { cursor: pointer; } /* a disabled one keeps the arrow */
|
|
|
188
188
|
|
|
189
189
|
.t-muted { color: var(--card-muted); } /* the muted words of whatever it stands on: the screen, a card of any tone, a drawer */
|
|
190
190
|
.t-caps { text-transform: uppercase; }
|
|
191
|
+
/* ---- strong: some words heavier INSIDE running text (cardds#229) ----
|
|
192
|
+
<p class="t-caption"><strong class="strong">Noi</strong> • asked for a ride</p> Weight only: the size, ink and line are the text's. */
|
|
193
|
+
.strong { font-weight: var(--strong-weight, var(--fw-bold)); }
|
|
194
|
+
/* ---- the corner word of a Text (cardds#229): one short word at the top end, the first line runs round it, the rest is full width ----
|
|
195
|
+
<span class="t-caption t-lines t-lines--3"><span class="t-corner-flow"><span class="t-corner">5 min</span>words…</span></span>
|
|
196
|
+
The flow is a block of its own: the cut (`-webkit-box`) turns its direct children into flex items, which ignore a float. */
|
|
197
|
+
.t-corner-flow { display: block; }
|
|
198
|
+
.t-corner { float: inline-end; margin-inline-start: var(--text-corner-gap, var(--sp-2)); color: var(--text-corner-ink, var(--card-muted)); }
|
|
191
199
|
/* ---- mark: a highlighter stroke over a word INSIDE running text (a sender's name in a greeting) ----
|
|
192
200
|
<p class="t-body"><mark class="mark">ธนาคารเวลา</mark> ส่งแสตมป์ดวงแรกให้คุณ</p>
|
|
193
201
|
The words keep their ink and their size; the stroke is the signal washed thin, drawn as a pen would: unlike corners, the ink
|
|
@@ -210,6 +218,9 @@ button:enabled { cursor: pointer; } /* a disabled one keeps the arrow */
|
|
|
210
218
|
.mark--warn { --_bg: color-mix(in srgb, var(--signal-warn) 30%, transparent); }
|
|
211
219
|
.mark--error { --_bg: color-mix(in srgb, var(--signal-error) 30%, transparent); }
|
|
212
220
|
.mark--info { --_bg: color-mix(in srgb, var(--signal-info) 30%, transparent); }
|
|
221
|
+
/* a phrase that is not split (Phrase, cardds#224): an inline-block is one unit, so the line breaks before it or after it, never inside it; sized to its own words,
|
|
222
|
+
and never wider than the box it stands in (a phrase longer than that breaks inside itself rather than run out of the box). Nothing is clipped or hidden */
|
|
223
|
+
.phrase { display: inline-block; max-width: 100%; overflow-wrap: anywhere; }
|
|
213
224
|
.grow { flex: 1; min-width: 0; } /* the child that takes the remaining row space */
|
|
214
225
|
/* read, not shown (Lh 2026-09-23): words a screen reader needs — a page's h1 the design leaves out — kept in the page, taking no room.
|
|
215
226
|
The 1px is the one the platform needs to keep it in the accessibility tree, not a length of the design. */
|
|
@@ -285,10 +296,10 @@ button:enabled { cursor: pointer; } /* a disabled one keeps the arrow */
|
|
|
285
296
|
.screen--fill > .screen__centre {
|
|
286
297
|
position: absolute;
|
|
287
298
|
top: var(--screen-centre);
|
|
288
|
-
translate: 0 -
|
|
299
|
+
translate: 0 var(--centre-lift); /* its own 40% point on --screen-centre, as a .card--centre (card.css) */
|
|
289
300
|
/* the cap: as a .card--centre's (card.css, which says why) */
|
|
290
301
|
--_lead: 0rem;
|
|
291
|
-
max-height:
|
|
302
|
+
max-height: min((var(--screen-centre) - var(--_lead) - var(--screen-gap)) / var(--centre-at), (100% - var(--screen-centre) - var(--bar-reserve)) / (1 - var(--centre-at)));
|
|
292
303
|
overflow-y: auto;
|
|
293
304
|
overscroll-behavior: contain;
|
|
294
305
|
}
|
package/css/card.css
CHANGED
|
@@ -45,6 +45,11 @@
|
|
|
45
45
|
|
|
46
46
|
.card__media { border-radius: var(--card-media-radius, var(--r-media)); overflow: hidden; position: relative; } /* relative: corner badges */
|
|
47
47
|
.card__media > img { width: 100%; height: auto; object-fit: cover; }
|
|
48
|
+
/* a full-width picture outside a card (CardMedia full, cardds#226): the holder's width, the corner --r-media, the picture's own ratio — one taller than --card-media-max-ratio
|
|
49
|
+
(height ÷ width, default 1.25 = 4:5) is cut at its middle. The wrapper is the container the cap is measured in (cqw = its width) */
|
|
50
|
+
.card__media--full { container-type: inline-size; width: 100%; }
|
|
51
|
+
.card__media--full > img { display: block; max-height: calc(100cqw * var(--card-media-max-ratio, 1.25)); object-position: center; }
|
|
52
|
+
.card__media--full > .ph { min-height: 0; aspect-ratio: 4 / 3; border-radius: 0; }
|
|
48
53
|
/* media beside (MediaBeside, Lh 2026-10-28): the words, and at their end a small square picture, the media's corner, cropped to fill it */
|
|
49
54
|
.media-beside { display: grid; grid-template-columns: minmax(0, 1fr) var(--media-beside-size, calc(var(--tap) * 3 / 2)); gap: var(--media-beside-gap, var(--sp-3)); align-items: start; }
|
|
50
55
|
.media-beside__words { display: grid; gap: var(--sp-1); min-width: 0; }
|
|
@@ -160,8 +165,10 @@
|
|
|
160
165
|
Where the centre of a phone IS, to the person holding it: the bottom fifth is
|
|
161
166
|
the thumb's — the bar, the controls — so what is meant to be read sits at the
|
|
162
167
|
middle of the four fifths above it, --screen-centre (40%) down the screen, not
|
|
163
|
-
at 50%. (Lh, 2026-09-10.)
|
|
164
|
-
|
|
168
|
+
at 50%. (Lh, 2026-09-10.) The card stands on that line by ITS OWN 40% point,
|
|
169
|
+
not its middle (Lh, 2026-11-18): the point 40% down the card is the point 40%
|
|
170
|
+
down the screen, so the card's middle is a tenth of its height under the
|
|
171
|
+
line, still over the screen's own middle (--centre-lift). Any screen with one card and nothing else to read may.
|
|
165
172
|
<div class="screen screen--fill"><header class="topbar">…</header><article class="card card--centre">…</article></div>
|
|
166
173
|
<div class="action-bar">…</div>
|
|
167
174
|
The card hugs its words and keeps the screen's inset. It is capped so that it
|
|
@@ -170,14 +177,15 @@
|
|
|
170
177
|
.card--centre {
|
|
171
178
|
position: absolute;
|
|
172
179
|
top: var(--screen-centre);
|
|
173
|
-
translate: 0 -
|
|
174
|
-
/* the cap:
|
|
175
|
-
|
|
176
|
-
|
|
180
|
+
translate: 0 var(--centre-lift);
|
|
181
|
+
/* the cap: the room above the centre (the title bar's height, when one is
|
|
182
|
+
there, and the screen's gap) is the card's 40% above its point, so the card
|
|
183
|
+
may be that room / 0.4 tall; the room below it (the bar's reserve) is its 60%,
|
|
184
|
+
so that room / 0.6 — whichever is less. --_lead is the title bar's height
|
|
177
185
|
only on a screen that HAS one: without a .topbar/.appbar before it the
|
|
178
186
|
block keeps that room (a card and its pager under it needs it on a short phone; Lh, 2026-09-11). */
|
|
179
187
|
--_lead: 0rem;
|
|
180
|
-
max-height:
|
|
188
|
+
max-height: min((var(--screen-centre) - var(--_lead) - var(--screen-gap)) / var(--centre-at), (100% - var(--screen-centre) - var(--bar-reserve)) / (1 - var(--centre-at)));
|
|
181
189
|
overflow-y: auto;
|
|
182
190
|
overscroll-behavior: contain;
|
|
183
191
|
}
|
|
@@ -251,6 +259,14 @@
|
|
|
251
259
|
|
|
252
260
|
/* ---- card list: rows, each row its own boundary ---- */
|
|
253
261
|
.card-list { display: grid; gap: var(--card-list-gap, var(--sp-3)); }
|
|
262
|
+
/* thin (`CardList thin`, cardds#213, a feed — Lh 2026-11-17 "ก การ์ดบาง"): every card in the list thinner by its three rest values, set for the
|
|
263
|
+
list's cards alone (a card reads them as `--card-pad` / `--card-gap` / its corner, so its variants and parts follow); a card outside, and a
|
|
264
|
+
`Thread` standing between the cards, do not change */
|
|
265
|
+
.card-list--thin > .card {
|
|
266
|
+
--card-pad-rest: var(--card-list-thin-pad, var(--sp-4));
|
|
267
|
+
--card-gap-rest: var(--card-list-thin-gap, var(--sp-5));
|
|
268
|
+
--r-card: var(--card-list-thin-radius, var(--r-base));
|
|
269
|
+
}
|
|
254
270
|
|
|
255
271
|
.card--row {
|
|
256
272
|
border-radius: var(--card-row-radius, var(--r-card-row)); /* small: the big card's corner in proportion, not its size */
|
|
@@ -319,6 +335,22 @@
|
|
|
319
335
|
.feed-card { row-gap: 0; }
|
|
320
336
|
.feed-card > .head:has(> .t-caption) > .feed-card__lead { grid-row: span 2; }
|
|
321
337
|
.feed-card__lead { display: grid; } /* placed by the head's align-items: top with a caption, middle without (parts.css) */ /* a Stamp here is the small one, 48 × 60 (stamp.css) */
|
|
338
|
+
/* FeedPost (cardds#213, Lh 2026-11-17 "ก การ์ดบาง"): ONE post in a feed — head · words · a picture full width · the moves (a BtnGroup frame).
|
|
339
|
+
GROUPS: the head's lines --sp-1 apart, the post's parts --sp-5 (the card's gap, so a thin CardList's cards and its posts read alike).
|
|
340
|
+
The head: the author bold in the label's size, ` · time` small and muted on the same line, how it came under them (the Head's meta).
|
|
341
|
+
The picture: full width at its own shape, cut in its middle past the tallest shape the post allows (width / height, 4 / 3; on a sheet
|
|
342
|
+
an app sets 4 / 5) — the box is a size container, so the cap is a share of its own width (cqi, iOS 16).
|
|
343
|
+
<article class="card feed-post"><div class="head"><span class="avatar">…</span><h2 class="words__title">Somsri<span class="feed-post__time"> · 40 min</span></h2>…</div>
|
|
344
|
+
<p class="t-body">…</p><div class="feed-post__media"><img …></div><div class="icon-btn-group" role="group">…</div></article> */
|
|
345
|
+
.feed-post { --card-gap: var(--feed-post-gap, var(--sp-5)); }
|
|
346
|
+
.feed-post > .head {
|
|
347
|
+
--head-row-gap: var(--sp-1);
|
|
348
|
+
--words-title-font: var(--fw-bold) var(--fs-label) / round(down, calc(var(--lh-label) * 1em), 1px) var(--face-label);
|
|
349
|
+
}
|
|
350
|
+
.feed-post__time { font: var(--type-caption); color: var(--card-muted); }
|
|
351
|
+
.feed-post__media { container-type: inline-size; border-radius: var(--r-media); overflow: hidden; }
|
|
352
|
+
.feed-post__media > * { display: block; width: 100%; max-height: calc(100cqi / (var(--feed-post-media-ratio, 4 / 3))); object-fit: cover; object-position: center; border-radius: inherit; }
|
|
353
|
+
.feed-post__media > img { height: auto; }
|
|
322
354
|
/* FeedEnd (Lh 2026-10-29): the end of a feed — a drawn cat, its tail wagging, and a caption. Quiet: the ground's muted ink. */
|
|
323
355
|
.feed-end { display: grid; justify-items: center; gap: var(--sp-2); padding-block: var(--sp-4); color: var(--feed-end-ink, var(--on-surface-muted)); text-align: center; }
|
|
324
356
|
.feed-end__cat { width: var(--feed-end-size, var(--stamp)); height: auto; }
|
package/css/layover.css
CHANGED
|
@@ -22,8 +22,8 @@
|
|
|
22
22
|
1. the card drops in from above the stage to the screen's centre — its
|
|
23
23
|
drawer still inside it, height 0: nothing of the ask shows yet
|
|
24
24
|
2. the drawer comes out of the card's bottom edge while the lift moves
|
|
25
|
-
up, both at once: the card grows
|
|
26
|
-
(the modal
|
|
25
|
+
up, both at once: the card grows about its 40% point, which never moves
|
|
26
|
+
(the modal stands itself on --screen-centre — absolute, margin auto; a growing card keeps that point where it is)
|
|
27
27
|
Closing: <Modal open onClosed> — set open={false} and the Modal component plays the
|
|
28
28
|
same animations in reverse (Animation.reverse() on each — nothing duplicated), then
|
|
29
29
|
calls onClosed for the app to unmount the stage. Modal no longer knows its own
|
|
@@ -31,14 +31,16 @@
|
|
|
31
31
|
sets open={false}).
|
|
32
32
|
Reduced motion: the finished state, no beats; closing fires at once. */
|
|
33
33
|
.modal {
|
|
34
|
-
position: absolute; /* at the stage's centre, and kept there as it grows: its
|
|
35
|
-
top:
|
|
34
|
+
position: absolute; /* at the stage's centre, and kept there as it grows: its 40% point is pinned at --screen-centre and */
|
|
35
|
+
top: var(--screen-centre); /* translate -40% of its OWN height (--centre-lift) re-seats it on every height. NOT inset 0 + margin auto + */
|
|
36
36
|
inset-inline: 0; /* align-self: center — Safari 18 ignores align-self on an absolute box in a block container, */
|
|
37
37
|
margin-inline: auto; /* so the card stretched to the whole stage (iOS 18.6, Lh 2026-09-24); nor height: fit-content */
|
|
38
|
-
translate: 0 -
|
|
38
|
+
translate: 0 var(--centre-lift);
|
|
39
39
|
width: calc(100% - 2 * var(--screen-pad));
|
|
40
40
|
z-index: var(--z-over-2); /* over the dim stage's scrim (z 1) */
|
|
41
|
-
|
|
41
|
+
/* the cap, as a .card--centre's (card.css): its 40% above the point must clear the top bar's line (--_top) and the screen's gap, its 60% below
|
|
42
|
+
must stay out of the bar's room (--bar-reserve); past that the body scrolls (the drawer keeps its height). % of the stage: it is the box it stands in */
|
|
43
|
+
max-height: min((var(--screen-centre) - var(--_top, 0rem) - var(--screen-gap, var(--sp-5))) / var(--centre-at), (100% - var(--screen-centre) - var(--bar-reserve)) / (1 - var(--centre-at)));
|
|
42
44
|
padding: 0; /* the parts pad themselves */
|
|
43
45
|
border: 0; /* no frame on the modal (Lh 2026-09-16) — its edge is the shadow */
|
|
44
46
|
display: flex; /* a column: the lift shrinks (and scrolls) under max-height, the drawer keeps its height. NOT a grid */
|
|
@@ -84,8 +86,8 @@
|
|
|
84
86
|
.modal { animation: modal-drop calc(2 * var(--motion-sheet)) var(--ease) both; }
|
|
85
87
|
.modal__drawer { animation: modal-open calc(2 * var(--motion-sheet)) var(--ease) both; }
|
|
86
88
|
@keyframes modal-drop {
|
|
87
|
-
0% { translate: 0 calc(-
|
|
88
|
-
50%, 100% { translate: 0 -
|
|
89
|
+
0% { translate: 0 calc(var(--centre-lift) - 100cqh); } /* above the stage */
|
|
90
|
+
50%, 100% { translate: 0 var(--centre-lift); } /* 1. at the centre — and it stays: beat 2 is the drawer's */
|
|
89
91
|
}
|
|
90
92
|
@keyframes modal-open {
|
|
91
93
|
0%, 50% { height: 0; padding-block: 0; } /* inside the card */
|
|
@@ -168,23 +170,28 @@
|
|
|
168
170
|
<div class="popup popup--end" id="inbox" popover role="group"><div class="popup__head"><span class="words">…</span><button class="btn">Read all</button></div>
|
|
169
171
|
<div class="rows rows--joined"><a class="row">…</a>…</div></div>
|
|
170
172
|
Native popover, as .menu: light dismiss, Esc, top layer, anchored to its invoker where anchor positioning exists. It is a paper of its own (the card-1 ground, so
|
|
171
|
-
the words on it follow that side), never wider than the
|
|
173
|
+
the words on it follow that side), never wider than the room it has less its two margins, and scrolls inside itself when the room under the button is short: the head
|
|
172
174
|
is sticky, opaque, so a row's fill passes under it. Without anchor positioning (iOS before 26) it hangs under the top bar: the margin from the screen's start edge,
|
|
173
|
-
or from its end edge (a margin in) with .popup--end. .popup--end = the button is at the screen's right: the popup's right edge is the button's, it grows leftwards (as .menu--end), its
|
|
175
|
+
or from its end edge (a margin in) with .popup--end. .popup--end = the button is at the screen's right: the popup's right edge is --sp-2 in from the button's, it grows leftwards (as .menu--end), its far margin kept by max-width.
|
|
176
|
+
Narrower than the cards under it (cardds#222, Lh 2026-11-17: "ซ้อนกันเกินไป"): a card stands --screen-pad in from the screen, so the popup stands --sp-2 in from the card's edge on the button's side and --sp-6 in on the far side — the card's edge shows on both. */
|
|
174
177
|
.popup {
|
|
175
178
|
--card-bg: var(--card-1-bg); /* the paper's own slot (a ring, a fold reads it); its side, the inks follow (tokens.css) */
|
|
176
179
|
--dark: var(--card-1-dark);
|
|
177
180
|
--_popup-w: calc(var(--tap-base) * 8); /* 384: the widest it grows */
|
|
178
181
|
--_popup-max-h: calc(var(--tap-base) * 12); /* 576: the tallest it grows, short screens aside */
|
|
179
182
|
--_popup-room: calc(100dvh - var(--safe-top) - var(--header-h) - var(--sp-2) - var(--popup-margin, var(--sp-3))); /* the room under the top bar; anchored, what is under the button (below) */
|
|
183
|
+
--_popup-near: calc(var(--screen-pad) + var(--sp-2)); /* from the screen's edge, the button's side: --sp-2 inside the card's edge */
|
|
184
|
+
--_popup-far: calc(var(--screen-pad) + var(--sp-6)); /* from the screen's edge, the far side: --sp-6 inside the card's edge */
|
|
185
|
+
--_popup-m-near: var(--popup-margin, var(--_popup-near));
|
|
186
|
+
--_popup-m-far: var(--popup-margin, var(--_popup-far));
|
|
180
187
|
display: none; /* explicit closed state — never display on the base rule */
|
|
181
188
|
margin: 0;
|
|
182
189
|
padding: 0;
|
|
183
190
|
inset: auto;
|
|
184
191
|
inset-block-start: calc(var(--safe-top) + var(--header-h) + var(--sp-2));
|
|
185
|
-
inset-inline-start: var(--
|
|
192
|
+
inset-inline-start: var(--_popup-m-near);
|
|
186
193
|
width: var(--popup-w, var(--_popup-w));
|
|
187
|
-
max-width: calc(100% -
|
|
194
|
+
max-width: calc(100% - var(--_popup-m-near) - var(--_popup-m-far));
|
|
188
195
|
max-height: min(var(--popup-max-h, var(--_popup-max-h)), var(--_popup-room));
|
|
189
196
|
overflow-y: auto;
|
|
190
197
|
overscroll-behavior: contain;
|
|
@@ -196,7 +203,7 @@
|
|
|
196
203
|
}
|
|
197
204
|
.popup:popover-open { display: block; }
|
|
198
205
|
.popup.\:popover-open { display: block; } /* the polyfill's open (iOS 16.4), its own rule as .menu's */
|
|
199
|
-
.popup--end { inset-inline-start: auto; inset-inline-end: var(--
|
|
206
|
+
.popup--end { inset-inline-start: auto; inset-inline-end: var(--_popup-m-near); }
|
|
200
207
|
.popup__head {
|
|
201
208
|
position: sticky;
|
|
202
209
|
inset-block-start: 0;
|
|
@@ -215,10 +222,12 @@
|
|
|
215
222
|
position-area: block-end span-inline-end; /* from the button's start edge, rightwards */
|
|
216
223
|
inset: auto;
|
|
217
224
|
margin-block: var(--sp-2) var(--popup-margin, var(--sp-3));
|
|
225
|
+
--_popup-near: var(--sp-2); /* the area starts at the button, whose edge is the card's: the margin is measured from it */
|
|
226
|
+
margin-inline: var(--_popup-m-near) var(--_popup-m-far);
|
|
218
227
|
--_popup-room: calc(100% - var(--sp-2) - var(--popup-margin, var(--sp-3))); /* % of the area under the button */
|
|
219
228
|
position-try-fallbacks: flip-block;
|
|
220
229
|
}
|
|
221
|
-
.popup--end[popover] { position-area: block-end span-inline-start; } /* the button's right edge, leftwards (as .menu--end): the
|
|
230
|
+
.popup--end[popover] { position-area: block-end span-inline-start; margin-inline: var(--_popup-m-far) var(--_popup-m-near); } /* the button's right edge, leftwards (as .menu--end): the area starts at the screen's left, so the far margin is from the screen */
|
|
222
231
|
}
|
|
223
232
|
@media (prefers-reduced-motion: no-preference) {
|
|
224
233
|
.popup[popover] {
|
|
@@ -359,12 +368,12 @@
|
|
|
359
368
|
/* ---- splash: the app's mark at the human centre while it boots (Lh 2026-09-24) ----
|
|
360
369
|
<section class="screen screen--fill splash"><div class="splash__group"><div class="splash__mark">{the app's lottie/img}</div>
|
|
361
370
|
<p class="splash__text">…</p></div></section>
|
|
362
|
-
The group's
|
|
371
|
+
The group's own 40% point is on --screen-centre (40% down), the same line a centred card uses. The mark is the app's own content —
|
|
363
372
|
a lottie box often carries empty room around its drawing — the app sets the knobs below, cardds does not guess it. */
|
|
364
373
|
.splash { position: relative; background: var(--splash-bg, var(--surface)); transition: opacity var(--motion-sheet) var(--ease); }
|
|
365
374
|
.splash--leaving { opacity: 0; }
|
|
366
375
|
.splash__group {
|
|
367
|
-
position: absolute; inset-inline: var(--screen-pad); top: var(--splash-at, var(--screen-centre)); translate: 0 -
|
|
376
|
+
position: absolute; inset-inline: var(--screen-pad); top: var(--splash-at, var(--screen-centre)); translate: 0 var(--centre-lift);
|
|
368
377
|
display: grid; justify-items: center; gap: var(--splash-gap, var(--sp-4)); text-align: center;
|
|
369
378
|
}
|
|
370
379
|
.splash__mark { width: var(--splash-mark-w, 60%); max-width: 100%; translate: var(--splash-mark-x, 0) var(--splash-mark-y, 0); }
|
package/css/lists.css
CHANGED
|
@@ -21,6 +21,15 @@
|
|
|
21
21
|
Space BETWEEN rows is .rows' gap; a lone row as card content takes the card's
|
|
22
22
|
gap. (.row--flush, which zeroed the old padding, is gone — every row is flush.) */
|
|
23
23
|
.row--lg { min-height: var(--row-lg-min-h, var(--fab)); } /* menu rows: a taller target, round arrow at the end; .rows gives them more air */
|
|
24
|
+
/* a lead as tall as N lines of the words beside it (Row leadLines, cardds#229): the stamp N lines tall at its 4:5 shape, a Lead a square as wide as that stamp, the row's
|
|
25
|
+
centring puts it in the middle of the height. The line is the level's own (body, or caption with `leadText="caption"`), so it follows the text size */
|
|
26
|
+
.row--lead-1 { --_lead-n: 1; }
|
|
27
|
+
.row--lead-2 { --_lead-n: 2; }
|
|
28
|
+
.row--lead-3 { --_lead-n: 3; }
|
|
29
|
+
.row--lead-lines { --_lead-line: round(down, calc(var(--lh-body) * var(--fs-body)), 1px); --_lead-w: calc(var(--_lead-n) * var(--_lead-line) * 4 / 5); }
|
|
30
|
+
.row--lead-caption { --_lead-line: round(down, calc(var(--lh-caption) * var(--fs-caption)), 1px); }
|
|
31
|
+
.row--lead-lines > .avatar-stack { --stamp-sm-size: var(--_lead-w); }
|
|
32
|
+
.row--lead-lines > .lead { --lead-size: var(--_lead-w); }
|
|
24
33
|
/* a row that EXPANDS (Lh 2026-09-22): the row is a <details>' summary, what it shows comes out under it —
|
|
25
34
|
who liked a postcard, the rest of a list. An end chevron turns when open. The app owns the list.
|
|
26
35
|
<details class="row-expand"><summary class="row">…lead · body · end…</summary><div class="row-expand__more">…</div></details> */
|
|
@@ -46,6 +55,17 @@
|
|
|
46
55
|
display: grid;
|
|
47
56
|
place-items: center;
|
|
48
57
|
}
|
|
58
|
+
/* a checklist item still to do (`Row todo`, cardds#223): the tick's place and size, empty and dashed; the words fade (the ring too, the one ink): not done yet, not active.
|
|
59
|
+
The row is a link or a button (the press list in actions.css): the whole row is the target. The circle is drawn, never a control. */
|
|
60
|
+
.row--todo { --_todo-fade: color-mix(in srgb, var(--card-ink) 40%, transparent); --_todo-ink: var(--row-todo-ink, var(--_todo-fade)); }
|
|
61
|
+
.row__todo {
|
|
62
|
+
width: var(--row-done-size, var(--tap-sm));
|
|
63
|
+
height: var(--row-done-size, var(--tap-sm));
|
|
64
|
+
flex: none;
|
|
65
|
+
margin-left: auto;
|
|
66
|
+
border-radius: 50%;
|
|
67
|
+
border: var(--border-w) dashed var(--row-todo-ring, var(--_todo-ink));
|
|
68
|
+
}
|
|
49
69
|
|
|
50
70
|
/* rows: a list of rows separated by hairlines */
|
|
51
71
|
.rows { display: grid; --rows-gap: var(--sp-4); row-gap: var(--rows-gap); }
|
|
@@ -70,7 +90,7 @@
|
|
|
70
90
|
touches the next and reads as a band. The between-rows hairline is not drawn (the border is the line); a list for a holder that fills its width (a Popup) */
|
|
71
91
|
.rows.rows--joined { --rows-gap: 0rem; }
|
|
72
92
|
.rows--joined > .row + .row::before { display: none; }
|
|
73
|
-
.rows--joined > :is(.row, .row-expand) { border-bottom: var(--border-w) solid var(--rows-joined-border, var(--hairline)); }
|
|
93
|
+
.rows--joined > :is(.row, .row-expand) { border-bottom: var(--rows-joined-border-w, var(--px)) solid var(--rows-joined-border, var(--hairline-soft)); } /* thin and faint (Lh 2026-11-18: the dark line was too strong): was --border-w at --hairline */
|
|
74
94
|
.rows--joined > .row, .rows--joined > .row-expand > summary { padding: var(--rows-joined-pad-y, var(--sp-3)) var(--rows-joined-pad-x, var(--sp-4)); }
|
|
75
95
|
.rows--joined > .row-expand > .row-expand__more { padding: 0 var(--rows-joined-pad-x, var(--sp-4)) var(--rows-joined-pad-y, var(--sp-3)); }
|
|
76
96
|
.rows--joined > .rows__head { padding: var(--rows-joined-pad-y, var(--sp-3)) var(--rows-joined-pad-x, var(--sp-4)) 0; }
|
|
@@ -108,6 +128,9 @@
|
|
|
108
128
|
the round Btn hangs up from it at the end corner while the reader is away from the end */
|
|
109
129
|
.thread__end { position: sticky; bottom: 0; height: 0; margin-top: calc(-1 * var(--thread-gap, var(--sp-4))); display: grid; justify-items: end; z-index: 1; }
|
|
110
130
|
.thread__jump { translate: 0 calc(-100% - var(--thread-jump-at, var(--sp-3))); }
|
|
131
|
+
/* a Thread standing in a CardList between its cards (a feed, cardds#214): a bubble is no card, so it needs more room than the gap between two
|
|
132
|
+
cards, the same over it and under it (the end room above is a chat's, for the bar under it) */
|
|
133
|
+
.card-list > .thread { padding-block: var(--thread-room-size, var(--sp-4)); }
|
|
111
134
|
.bubble__author + *::before { content: "·"; margin-inline-end: var(--bubble-meta-gap, var(--sp-1)); }
|
|
112
135
|
.bubble__author:has(+ *) { margin-inline-end: var(--bubble-meta-gap, var(--sp-1)); }
|
|
113
136
|
.bubble__day:has(+ *) { margin-inline-end: var(--bubble-meta-gap, var(--sp-1)); } /* the day, then the time: "Dec 4 8:15" */
|
|
@@ -134,20 +157,51 @@
|
|
|
134
157
|
font: var(--bubble-body-font, var(--type-body));
|
|
135
158
|
overflow-wrap: anywhere;
|
|
136
159
|
}
|
|
137
|
-
.bubble--right
|
|
160
|
+
.bubble--right .bubble__body {
|
|
138
161
|
border-bottom-left-radius: var(--r-card);
|
|
139
162
|
border-bottom-right-radius: var(--bubble-tail-radius, var(--r-tail));
|
|
140
163
|
background: var(--accent);
|
|
164
|
+
--dark: var(--accent-dark); /* the accent fill's side: the muted ink of its quote follows it */
|
|
141
165
|
color: var(--on-accent);
|
|
142
166
|
text-align: right;
|
|
143
167
|
}
|
|
168
|
+
/* the line of the message this one answers (Bubble quote, cardds#227): first inside the body, over the words, one line cut with "…", a rule at its start as the
|
|
169
|
+
MessageBar's quote has; its words and rule are the muted ink of the body's ground, so fainter than the words on a theirs and a mine bubble alike */
|
|
170
|
+
.bubble__quote {
|
|
171
|
+
display: block;
|
|
172
|
+
margin-bottom: var(--sp-1);
|
|
173
|
+
padding-inline-start: var(--sp-3);
|
|
174
|
+
border-inline-start: var(--sp-1) solid var(--bubble-quote-rule-ink, var(--card-muted));
|
|
175
|
+
font: var(--type-caption);
|
|
176
|
+
color: var(--bubble-quote-ink, var(--card-muted));
|
|
177
|
+
white-space: nowrap;
|
|
178
|
+
overflow: hidden;
|
|
179
|
+
text-overflow: ellipsis;
|
|
180
|
+
text-align: start;
|
|
181
|
+
}
|
|
144
182
|
.bubble__meta { display: flex; align-items: center; gap: var(--bubble-meta-gap, var(--sp-1)); font: var(--bubble-meta-font, var(--type-caption)); color: var(--bubble-meta-ink, var(--card-muted)); }
|
|
145
183
|
.bubble--right > .bubble__meta { justify-self: end; }
|
|
146
|
-
.bubble__meta > .icon { --icon-ink: var(--bubble-meta-icon-ink, var(--accent-ink)); }
|
|
184
|
+
.bubble__meta > .icon, .bubble__time > .icon { --icon-ink: var(--bubble-meta-icon-ink, var(--accent-ink)); }
|
|
185
|
+
/* the line ABOVE the message (Bubble metaAbove, cardds#214): who sent it, read before the words — lead · name · time on one line, the bubble
|
|
186
|
+
under it from the start edge (not led in beside the lead: that left a few words a line). The line comes first in the markup (the reader hears
|
|
187
|
+
who, then what), the same meta line as below the message and its separators. The bubble hugs its words however long the line is
|
|
188
|
+
(justify-items), and the line never wraps: the name gives way with "…", the lead and the time keep their size. Under the line --sp-2. */
|
|
189
|
+
.bubble--meta-above { row-gap: var(--bubble-meta-above-gap, var(--sp-2)); justify-items: start; }
|
|
190
|
+
.bubble--meta-above.bubble--right { justify-items: end; }
|
|
191
|
+
.bubble--meta-above > .bubble__meta { min-width: 0; max-width: 100%; }
|
|
192
|
+
.bubble__lead { flex: none; display: flex; margin-inline-end: var(--bubble-lead-gap, var(--sp-1)); } /* on top of the line's gap */
|
|
193
|
+
.bubble--meta-above .bubble__author { flex: 0 1 auto; min-width: 0; overflow-x: clip; overflow-y: visible; text-overflow: ellipsis; white-space: nowrap; font: var(--bubble-author-font, var(--type-label)); color: var(--bubble-author-ink, var(--card-ink)); } /* clip SIDEWAYS only: hidden cut the Thai tone marks over the line */
|
|
194
|
+
.bubble__time { flex: none; display: flex; align-items: center; gap: var(--bubble-meta-gap, var(--sp-1)); white-space: nowrap; }
|
|
195
|
+
/* the message with one round button of the app beside it (Bubble action, cardds#214): a row of the message and the button, the button on the
|
|
196
|
+
side the thread's middle is (after theirs, before mine), centred on the message's height. The bubble's 75% cap holds both */
|
|
197
|
+
.bubble__row { display: flex; align-items: center; gap: var(--bubble-action-gap, var(--sp-2)); min-width: 0; max-width: 100%; }
|
|
198
|
+
.bubble--right .bubble__row { flex-direction: row-reverse; }
|
|
199
|
+
.bubble__row > .bubble__body { flex: 0 1 auto; }
|
|
200
|
+
.bubble__action { flex: none; display: grid; }
|
|
147
201
|
/* a bubble that is a link or is pressed (Bubble href / onClick, Lh 2026-10-28): the press answer is the DIM (actions.css), no underline */
|
|
148
202
|
a.bubble { color: inherit; text-decoration: none; }
|
|
149
203
|
/* highlighted (Bubble highlighted): the message the member is looking at, a ring a hair outside its body */
|
|
150
|
-
.bubble--highlighted
|
|
204
|
+
.bubble--highlighted .bubble__body { outline: var(--sp-0) solid var(--bubble-highlighted-ink, var(--accent)); outline-offset: var(--sp-0); }
|
|
151
205
|
|
|
152
206
|
/* ---- timeline: a hairline with date chips, entries to the right ----
|
|
153
207
|
<ol class="timeline"><li class="timeline__item"><span class="timeline__mark">Wed 14</span><p class="t-body">…</p></li>…</ol> */
|
package/css/media.css
CHANGED
|
@@ -124,6 +124,39 @@
|
|
|
124
124
|
.mosaic > :first-child { grid-row: span 2; }
|
|
125
125
|
.mosaic > * { min-height: 0; border-radius: 0; } /* opacity/border-width here were no-ops: .ph restates its own below, and nothing else in a mosaic carries either by default */
|
|
126
126
|
.mosaic > img { width: 100%; height: 100%; object-fit: cover; }
|
|
127
|
+
/* two photos (cardds#226): side by side, one row, equally tall */
|
|
128
|
+
.mosaic--2 { grid-template-columns: 1fr 1fr; }
|
|
129
|
+
.mosaic--2 > :first-child { grid-row: auto; }
|
|
130
|
+
/* four or more: the small lower photo is darkened with "+n", n the photos not shown. The darkening is the scrim twice (75% black): one scrim is 3.9:1 under white words over a white photo, two are 10.4:1 */
|
|
131
|
+
.mosaic__more-cell { position: relative; display: grid; }
|
|
132
|
+
.mosaic__more-cell > :first-child { width: 100%; height: 100%; min-height: 0; border-radius: 0; object-fit: cover; }
|
|
133
|
+
.mosaic__more {
|
|
134
|
+
position: absolute; inset: 0; display: grid; place-items: center;
|
|
135
|
+
background: linear-gradient(var(--mosaic-more-bg, var(--scrim)), var(--mosaic-more-bg, var(--scrim))), var(--mosaic-more-bg, var(--scrim));
|
|
136
|
+
color: var(--mosaic-more-ink, var(--ink-ondark));
|
|
137
|
+
font: var(--mosaic-more-font, var(--type-title));
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
/* ---- thumb: one small square photo that can be pressed, and the grid it stands in (cardds#232) ----
|
|
141
|
+
<div class="thumb-grid"><button class="thumb" aria-label="Photo 1"><img src="…" alt=""></button>…</div>
|
|
142
|
+
The photo only — no words over or under it. The whole square is the control (its press is the shared list at the end of actions.css). */
|
|
143
|
+
.thumb-grid {
|
|
144
|
+
display: grid;
|
|
145
|
+
grid-template-columns: repeat(var(--thumb-grid-cols, 5), minmax(0, 1fr)); /* five to a row; the squares grow with the width they stand in */
|
|
146
|
+
gap: var(--thumb-grid-gap, var(--sp-2));
|
|
147
|
+
}
|
|
148
|
+
.thumb {
|
|
149
|
+
display: block;
|
|
150
|
+
aspect-ratio: 1;
|
|
151
|
+
min-width: 0;
|
|
152
|
+
padding: 0;
|
|
153
|
+
border: 0;
|
|
154
|
+
background: none;
|
|
155
|
+
color: inherit;
|
|
156
|
+
border-radius: var(--thumb-radius, var(--r-control));
|
|
157
|
+
overflow: hidden;
|
|
158
|
+
}
|
|
159
|
+
.thumb > img, .thumb > .ph { display: block; width: 100%; height: 100%; min-height: 0; object-fit: cover; border-radius: 0; }
|
|
127
160
|
|
|
128
161
|
/* ---- postcard: a member's introduction in the shape of a cover card — the photo fills it,
|
|
129
162
|
the band at the bottom names it; tap the photo to turn it over (Lh 2026-09-12; reshaped 2026-09-22) ----
|