@usableapp/cardds 0.7.160 → 0.7.161
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 +11 -0
- package/css/actions.css +11 -0
- package/css/parts.css +39 -19
- package/dist/actions/LinkBlock.d.ts +3 -2
- package/dist/actions/LinkBlock.js +5 -3
- package/dist/cardds.css +50 -19
- package/dist/catalog.json +1 -1
- package/dist/lists/Row.js +5 -2
- package/dist/parts/Head.d.ts +1 -0
- package/dist/parts/Head.js +5 -1
- package/dist/parts/Words.d.ts +2 -1
- package/dist/parts/Words.js +8 -3
- package/dist/parts/endRoom.d.ts +9 -0
- package/dist/parts/endRoom.js +35 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,17 @@
|
|
|
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.161 — 2026-10-28
|
|
6
|
+
|
|
7
|
+
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.
|
|
8
|
+
|
|
9
|
+
Components: Head, Words, Row, LinkBlock, End
|
|
10
|
+
|
|
11
|
+
### Changed
|
|
12
|
+
- **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.
|
|
13
|
+
- **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.
|
|
14
|
+
- **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.
|
|
15
|
+
|
|
5
16
|
## 0.7.160 — 2026-10-28
|
|
6
17
|
|
|
7
18
|
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
|
@@ -204,6 +204,17 @@
|
|
|
204
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
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
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)); }
|
|
207
|
+
/* …and the title's later lines run UNDER the end and the arrow at full width, round the Words' room for them (parts.css "the ends in the corner") */
|
|
208
|
+
.link-block > .row:has(> .lead:first-child + .words > .words__title:first-child > .words__room) > .words > .words__title { grid-column: 2 / -1; }
|
|
209
|
+
.link-block > .row:has(> .lead:first-child + .words > .words__title:first-child > .words__room) > .words > .words__title > .words__room { display: flex; gap: var(--row-gap, var(--sp-3)); padding-inline-start: var(--row-gap, var(--sp-3)); }
|
|
210
|
+
.link-block > .row:has(> .lead:first-child + .words > .words__title:first-child > .words__room) > :nth-child(3) { grid-column: 3; }
|
|
211
|
+
.link-block > .row:has(> .lead:first-child + .words > .words__title:first-child > .words__room) > :nth-child(4) { grid-column: 4; }
|
|
212
|
+
.link-block > .row:has(> .lead:first-child + .words > .words__title:first-child > .words__room) > :nth-child(5) { grid-column: 5; }
|
|
213
|
+
.link-block > .row:has(> .lead:first-child + .words > .words__title:first-child > .words__room) > :nth-child(6) { grid-column: 6; }
|
|
214
|
+
/* …and an End of words with its arrow stands centred in the title's FIRST line (title type's leading), as in a led Head (parts.css) */
|
|
215
|
+
.link-block > .row:has(> .lead:first-child + .words > .words__title:first-child + .words__meta) { --_line-h: round(down, calc(var(--lh-title) * var(--fs-title)), 1px); }
|
|
216
|
+
.link-block > .row:has(> .lead:first-child + .words > .words__title:first-child + .words__meta) > .end:not(:has(> .t-title)), .link-block > .row:has(> .lead:first-child + .words > .words__title:first-child + .words__meta) > .words > .words__title > .words__room > .end:not(:has(> .t-title)) { margin-block-start: calc((var(--_line-h) - round(down, calc(var(--lh-caption) * var(--fs-caption)), 1px)) / 2); }
|
|
217
|
+
.link-block > .row:has(> .lead:first-child + .words > .words__title:first-child + .words__meta) > .end:not(:has(> .t-title)) + .icon, .link-block > .row:has(> .lead:first-child + .words > .words__title:first-child + .words__meta) > .words > .words__title > .words__room > .end:not(:has(> .t-title)) + .icon { --icon-margin: calc((var(--_line-h) - var(--end-icon-size, var(--icon-xs))) / 2) 0; }
|
|
207
218
|
/* a row of buttons sharing the width (twin CTAs inside a card) */
|
|
208
219
|
.btn-row { display: flex; gap: var(--btn-row-gap, var(--sp-2)); }
|
|
209
220
|
/* round (BtnRow round, Lh 2026-10-24): a few round IconBtns as one group in the middle of a card's content, a fixed gap apart — Foot round's look,
|
package/css/parts.css
CHANGED
|
@@ -31,6 +31,14 @@
|
|
|
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 the line (Words renders it at the start of its title when the line hands
|
|
35
|
+
it them: a led Head with a meta, a LinkBlock's Row), floated at the title's first line's end so its later lines run under the real ends.
|
|
36
|
+
Nothing until a line lays its ends in the corner (parts.css head, actions.css link block) */
|
|
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
|
+
margin-block-end: min(0rem, calc(0.5em - 0.5lh)); /* the ends may reach into the next line's leading (empty), never its letters: an arrow a hair taller than a line keeps one line short, not two */
|
|
40
|
+
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 */
|
|
41
|
+
}
|
|
34
42
|
.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
43
|
.row--lg > .words > .words__title { font: var(--fw-bold) var(--fs-lg) / round(down, calc(var(--lh-h1) * 1em), 1px) var(--font-display); }
|
|
36
44
|
.row--done > .words > .words__title { color: var(--card-muted); }
|
|
@@ -38,6 +46,14 @@
|
|
|
38
46
|
/* ---- end: the value over its caption, right-aligned at the end of a line ---- */
|
|
39
47
|
.end { margin-left: auto; text-align: right; display: grid; gap: var(--end-gap, var(--sp-0)); justify-items: end; }
|
|
40
48
|
.row > .end { flex: none; }
|
|
49
|
+
/* an End of words with an icon after it or in it (a link's arrow: "Google Maps ↗"; Lh 2026-10-28): the two read as one. The icon is drawn at the
|
|
50
|
+
words' size (--icon-xs, the caption's), so its drawing is about as tall as their x-height and its stroke as heavy as their stem (at the default
|
|
51
|
+
bases: arrow 7.1 px tall, stroke 1.4 px; caption x-height 7.7 px, stem 1.5 px). Equal margins make it the caption's line box tall, so it
|
|
52
|
+
stands centred on the words whether the line centres its parts (a Row) or tops them (a led Head). An End with a value keeps the icon as it is. */
|
|
53
|
+
.end:not(:has(> .t-title)) + .icon, .end > .icon {
|
|
54
|
+
--icon-size: var(--end-icon-size, var(--icon-xs));
|
|
55
|
+
--icon-margin: calc((round(down, calc(var(--lh-caption) * var(--fs-caption)), 1px) - var(--end-icon-size, var(--icon-xs))) / 2) 0;
|
|
56
|
+
}
|
|
41
57
|
|
|
42
58
|
/* ---- 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
59
|
<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>
|
|
@@ -174,30 +190,34 @@
|
|
|
174
190
|
}
|
|
175
191
|
.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
192
|
.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
|
-
column, and the title's lines wrap round
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
.head:not(.head--centre):has(> :is(.lead, .avatar, .avatar-stack):first-child + .words__title + .words__meta):has(> .icon-btn ~ .icon-btn):not(:has(> :nth-child(n + 3):not(.words__meta, .icon-btn), > .icon-btn ~ .icon-btn ~ .icon-btn, > .icon-btn:is(.icon-btn--lg, .icon-btn--xl), > .icon-btn--sm ~ .icon-btn:not(.icon-btn--sm), > .icon-btn:not(.icon-btn--sm) ~ .icon-btn--sm)) { --_head-ends: 2; }
|
|
187
|
-
.head:not(.head--centre):has(> :is(.lead, .avatar, .avatar-stack):first-child + .words__title + .words__meta):has(> .icon-btn):not(:has(> :nth-child(n + 3):not(.words__meta, .icon-btn), > .icon-btn ~ .icon-btn ~ .icon-btn, > .icon-btn:is(.icon-btn--lg, .icon-btn--xl), > .icon-btn--sm ~ .icon-btn:not(.icon-btn--sm), > .icon-btn:not(.icon-btn--sm) ~ .icon-btn--sm)) > .icon-btn { grid-column: 2; grid-row: 1; justify-self: end; margin-inline-start: 0; }
|
|
188
|
-
.head:not(.head--centre):has(> :is(.lead, .avatar, .avatar-stack):first-child + .words__title + .words__meta):has(> .icon-btn):not(:has(> :nth-child(n + 3):not(.words__meta, .icon-btn), > .icon-btn ~ .icon-btn ~ .icon-btn, > .icon-btn:is(.icon-btn--lg, .icon-btn--xl), > .icon-btn--sm ~ .icon-btn:not(.icon-btn--sm), > .icon-btn:not(.icon-btn--sm) ~ .icon-btn--sm)) > .icon-btn:has(~ .icon-btn) { margin-inline-end: calc(var(--_head-end) + var(--head-col-gap, var(--sp-3))); }
|
|
189
|
-
.head:not(.head--centre):has(> :is(.lead, .avatar, .avatar-stack):first-child + .words__title + .words__meta):has(> .icon-btn):not(:has(> :nth-child(n + 3):not(.words__meta, .icon-btn), > .icon-btn ~ .icon-btn ~ .icon-btn, > .icon-btn:is(.icon-btn--lg, .icon-btn--xl), > .icon-btn--sm ~ .icon-btn:not(.icon-btn--sm), > .icon-btn:not(.icon-btn--sm) ~ .icon-btn--sm)) > .words__title {
|
|
193
|
+
/* the ends in the corner (Lh 2026-10-28: round buttons first; the same day any end, an End's words, a Btn sm): with a meta, whatever follows the
|
|
194
|
+
title stands in the top-right corner OVER the title's column, and the title's lines wrap round it as round a float — a line past the ends'
|
|
195
|
+
height runs the full width under them; the meta runs under all. The room is the Words' own .words__room (above): an unseen, inert copy of
|
|
196
|
+
the ends that the component renders at the start of the title, floated, so it is exactly as wide and as tall as the ends whatever they say.
|
|
197
|
+
The DOM order is untouched: the title is read first, the copy by nobody. No meta: no room, the centred line (below). The ends take the four
|
|
198
|
+
spare columns in order, so the title can span them.
|
|
199
|
+
<h2 class="words__title"><span class="words__room" aria-hidden="true" inert>…copies…</span>A long title</h2> */
|
|
200
|
+
.head:not(.head--centre):has(> :is(.lead, .avatar, .avatar-stack):first-child + .words__title > .words__room) > .words__title {
|
|
201
|
+
grid-column: 2 / -1;
|
|
190
202
|
/* WebKit draws a float inside the -webkit-box line clamp as a box of its own ABOVE the words, so this title is a plain block: cut at
|
|
191
203
|
--head-title-lines by its height (whole lines, no "…") */
|
|
192
204
|
display: flow-root;
|
|
193
205
|
max-height: calc(var(--head-title-lines, 3) * 1lh + var(--_mark-room) + var(--_mark-foot));
|
|
194
206
|
}
|
|
195
|
-
.head:not(.head--centre):has(> :is(.lead, .avatar, .avatar-stack):first-child + .words__title
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
207
|
+
.head:not(.head--centre):has(> :is(.lead, .avatar, .avatar-stack):first-child + .words__title > .words__room) > .words__title > .words__room { display: flex; gap: var(--head-col-gap, var(--sp-3)); padding-inline-start: var(--head-col-gap, var(--sp-3)); }
|
|
208
|
+
.head:not(.head--centre):has(> :is(.lead, .avatar, .avatar-stack):first-child + .words__title > .words__room) > :nth-child(4) { grid-column: 3; }
|
|
209
|
+
.head:not(.head--centre):has(> :is(.lead, .avatar, .avatar-stack):first-child + .words__title > .words__room) > :nth-child(5) { grid-column: 4; }
|
|
210
|
+
.head:not(.head--centre):has(> :is(.lead, .avatar, .avatar-stack):first-child + .words__title > .words__room) > :nth-child(6) { grid-column: 5; }
|
|
211
|
+
.head:not(.head--centre):has(> :is(.lead, .avatar, .avatar-stack):first-child + .words__title > .words__room) > :nth-child(7) { grid-column: 6; }
|
|
212
|
+
/* an End of words on the title's FIRST line (Lh 2026-10-28): the ends stand at the top, so an End's caption and its icon are centred in the
|
|
213
|
+
first line of the title (its leading, rounded as the type rounds it), not at the head's top. Its copy in the room moves with it, so the room
|
|
214
|
+
stays as tall as the ends and the second line still runs the full width. A round IconBtn or a Btn sm is taller than a line: it keeps the top.
|
|
215
|
+
--_line-h: the title's line, from its level's tokens (h2, or h1 / display when the Words says so) */
|
|
216
|
+
.head:not(.head--centre):has(> :is(.lead, .avatar, .avatar-stack):first-child + .words__title + .words__meta) { --_line-h: round(down, calc(var(--lh-h2) * var(--fs-h2)), 1px); }
|
|
217
|
+
.head:not(.head--centre):has(> :is(.lead, .avatar, .avatar-stack):first-child + .words__title + .words__meta):has(> .words__title.t-h1) { --_line-h: round(down, calc(var(--lh-h1) * var(--fs-h1)), 1px); }
|
|
218
|
+
.head:not(.head--centre):has(> :is(.lead, .avatar, .avatar-stack):first-child + .words__title + .words__meta):has(> .words__title.t-display) { --_line-h: round(down, calc(var(--lh-display) * var(--fs-display)), 1px); }
|
|
219
|
+
.head:not(.head--centre):has(> :is(.lead, .avatar, .avatar-stack):first-child + .words__title + .words__meta) > .end:not(:has(> .t-title)), .head:not(.head--centre):has(> :is(.lead, .avatar, .avatar-stack):first-child + .words__title + .words__meta) > .words__title > .words__room > .end:not(:has(> .t-title)) { margin-block-start: calc((var(--_line-h) - round(down, calc(var(--lh-caption) * var(--fs-caption)), 1px)) / 2); }
|
|
220
|
+
.head:not(.head--centre):has(> :is(.lead, .avatar, .avatar-stack):first-child + .words__title + .words__meta) > .end:not(:has(> .t-title)) + .icon, .head:not(.head--centre):has(> :is(.lead, .avatar, .avatar-stack):first-child + .words__title + .words__meta) > .words__title > .words__room > .end:not(:has(> .t-title)) + .icon { --icon-margin: calc((var(--_line-h) - var(--end-icon-size, var(--icon-xs))) / 2) 0; }
|
|
201
221
|
/* 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
222
|
.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
223
|
.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; }
|
|
@@ -5,5 +5,6 @@ export interface LinkBlockProps extends ComponentProps<'a'> {
|
|
|
5
5
|
}
|
|
6
6
|
/** LinkBlock — a link that is neither a card nor a row: a few pieces of a card's content (a still `MapArea` and the `Row` naming the place) as ONE
|
|
7
7
|
* `<a>`, stacked with the card's gap, in the ink of what holds it, no underline, no frame and no padding of its own; it dims under the finger.
|
|
8
|
-
* Name it with `aria-label` when it leaves the app (`target="_blank"`). Nothing that can be pressed goes inside. Knob `--link-block-gap`.
|
|
9
|
-
|
|
8
|
+
* Name it with `aria-label` when it leaves the app (`target="_blank"`). Nothing that can be pressed goes inside. Knob `--link-block-gap`.
|
|
9
|
+
* A `Row` in it with a lead and a meta: everything at the top, the title's later lines run under its end (and arrow) at full width, the meta under all. */
|
|
10
|
+
export declare function LinkBlock({ className, children, ...rest }: LinkBlockProps): import("react").JSX.Element;
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { cx } from '../cx.js';
|
|
3
|
+
import { RowEndRoomCtx } from '../parts/endRoom.js';
|
|
3
4
|
/** LinkBlock — a link that is neither a card nor a row: a few pieces of a card's content (a still `MapArea` and the `Row` naming the place) as ONE
|
|
4
5
|
* `<a>`, stacked with the card's gap, in the ink of what holds it, no underline, no frame and no padding of its own; it dims under the finger.
|
|
5
|
-
* Name it with `aria-label` when it leaves the app (`target="_blank"`). Nothing that can be pressed goes inside. Knob `--link-block-gap`.
|
|
6
|
-
|
|
7
|
-
|
|
6
|
+
* Name it with `aria-label` when it leaves the app (`target="_blank"`). Nothing that can be pressed goes inside. Knob `--link-block-gap`.
|
|
7
|
+
* A `Row` in it with a lead and a meta: everything at the top, the title's later lines run under its end (and arrow) at full width, the meta under all. */
|
|
8
|
+
export function LinkBlock({ className, children, ...rest }) {
|
|
9
|
+
return _jsx("a", { className: cx('link-block', className), ...rest, children: _jsx(RowEndRoomCtx.Provider, { value: true, children: children }) });
|
|
8
10
|
}
|
package/dist/cardds.css
CHANGED
|
@@ -3087,6 +3087,17 @@ button:enabled { cursor: pointer; } /* a disabled one keeps the arrow */
|
|
|
3087
3087
|
.link-block > .row:has(> .lead:first-child + .words > .words__title:first-child + .words__meta) > .words > .words__title { grid-column: 2; grid-row: 1; }
|
|
3088
3088
|
.link-block > .row:has(> .lead:first-child + .words > .words__title:first-child + .words__meta) > .words > .words__meta { grid-column: 2 / -1; grid-row: 2; }
|
|
3089
3089
|
.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)); }
|
|
3090
|
+
/* …and the title's later lines run UNDER the end and the arrow at full width, round the Words' room for them (parts.css "the ends in the corner") */
|
|
3091
|
+
.link-block > .row:has(> .lead:first-child + .words > .words__title:first-child > .words__room) > .words > .words__title { grid-column: 2 / -1; }
|
|
3092
|
+
.link-block > .row:has(> .lead:first-child + .words > .words__title:first-child > .words__room) > .words > .words__title > .words__room { display: flex; gap: var(--row-gap, var(--sp-3)); padding-inline-start: var(--row-gap, var(--sp-3)); }
|
|
3093
|
+
.link-block > .row:has(> .lead:first-child + .words > .words__title:first-child > .words__room) > :nth-child(3) { grid-column: 3; }
|
|
3094
|
+
.link-block > .row:has(> .lead:first-child + .words > .words__title:first-child > .words__room) > :nth-child(4) { grid-column: 4; }
|
|
3095
|
+
.link-block > .row:has(> .lead:first-child + .words > .words__title:first-child > .words__room) > :nth-child(5) { grid-column: 5; }
|
|
3096
|
+
.link-block > .row:has(> .lead:first-child + .words > .words__title:first-child > .words__room) > :nth-child(6) { grid-column: 6; }
|
|
3097
|
+
/* …and an End of words with its arrow stands centred in the title's FIRST line (title type's leading), as in a led Head (parts.css) */
|
|
3098
|
+
.link-block > .row:has(> .lead:first-child + .words > .words__title:first-child + .words__meta) { --_line-h: round(down, calc(var(--lh-title) * var(--fs-title)), 1px); }
|
|
3099
|
+
.link-block > .row:has(> .lead:first-child + .words > .words__title:first-child + .words__meta) > .end:not(:has(> .t-title)), .link-block > .row:has(> .lead:first-child + .words > .words__title:first-child + .words__meta) > .words > .words__title > .words__room > .end:not(:has(> .t-title)) { margin-block-start: calc((var(--_line-h) - round(down, calc(var(--lh-caption) * var(--fs-caption)), 1px)) / 2); }
|
|
3100
|
+
.link-block > .row:has(> .lead:first-child + .words > .words__title:first-child + .words__meta) > .end:not(:has(> .t-title)) + .icon, .link-block > .row:has(> .lead:first-child + .words > .words__title:first-child + .words__meta) > .words > .words__title > .words__room > .end:not(:has(> .t-title)) + .icon { --icon-margin: calc((var(--_line-h) - var(--end-icon-size, var(--icon-xs))) / 2) 0; }
|
|
3090
3101
|
/* a row of buttons sharing the width (twin CTAs inside a card) */
|
|
3091
3102
|
.btn-row { display: flex; gap: var(--btn-row-gap, var(--sp-2)); }
|
|
3092
3103
|
/* round (BtnRow round, Lh 2026-10-24): a few round IconBtns as one group in the middle of a card's content, a fixed gap apart — Foot round's look,
|
|
@@ -4506,6 +4517,14 @@ a.bubble { color: inherit; text-decoration: none; }
|
|
|
4506
4517
|
.row > .words { min-width: 0; }
|
|
4507
4518
|
.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) */
|
|
4508
4519
|
.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 */
|
|
4520
|
+
/* the ends' room (Lh 2026-10-28): an unseen, inert copy of the ends of the line (Words renders it at the start of its title when the line hands
|
|
4521
|
+
it them: a led Head with a meta, a LinkBlock's Row), floated at the title's first line's end so its later lines run under the real ends.
|
|
4522
|
+
Nothing until a line lays its ends in the corner (parts.css head, actions.css link block) */
|
|
4523
|
+
.words__room {
|
|
4524
|
+
display: none; float: right; align-items: flex-start; width: max-content; visibility: hidden; -webkit-user-select: none; user-select: none;
|
|
4525
|
+
margin-block-end: min(0rem, calc(0.5em - 0.5lh)); /* the ends may reach into the next line's leading (empty), never its letters: an arrow a hair taller than a line keeps one line short, not two */
|
|
4526
|
+
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 */
|
|
4527
|
+
}
|
|
4509
4528
|
.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)); }
|
|
4510
4529
|
.row--lg > .words > .words__title { font: var(--fw-bold) var(--fs-lg) / round(down, calc(var(--lh-h1) * 1em), 1px) var(--font-display); }
|
|
4511
4530
|
.row--done > .words > .words__title { color: var(--card-muted); }
|
|
@@ -4513,6 +4532,14 @@ a.bubble { color: inherit; text-decoration: none; }
|
|
|
4513
4532
|
/* ---- end: the value over its caption, right-aligned at the end of a line ---- */
|
|
4514
4533
|
.end { margin-left: auto; text-align: right; display: grid; gap: var(--end-gap, var(--sp-0)); justify-items: end; }
|
|
4515
4534
|
.row > .end { flex: none; }
|
|
4535
|
+
/* an End of words with an icon after it or in it (a link's arrow: "Google Maps ↗"; Lh 2026-10-28): the two read as one. The icon is drawn at the
|
|
4536
|
+
words' size (--icon-xs, the caption's), so its drawing is about as tall as their x-height and its stroke as heavy as their stem (at the default
|
|
4537
|
+
bases: arrow 7.1 px tall, stroke 1.4 px; caption x-height 7.7 px, stem 1.5 px). Equal margins make it the caption's line box tall, so it
|
|
4538
|
+
stands centred on the words whether the line centres its parts (a Row) or tops them (a led Head). An End with a value keeps the icon as it is. */
|
|
4539
|
+
.end:not(:has(> .t-title)) + .icon, .end > .icon {
|
|
4540
|
+
--icon-size: var(--end-icon-size, var(--icon-xs));
|
|
4541
|
+
--icon-margin: calc((round(down, calc(var(--lh-caption) * var(--fs-caption)), 1px) - var(--end-icon-size, var(--icon-xs))) / 2) 0;
|
|
4542
|
+
}
|
|
4516
4543
|
|
|
4517
4544
|
/* ---- head: the first row of a card, a sheet and a stack sheet. A lead, the Words, chips, an end, as its direct children.
|
|
4518
4545
|
<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>
|
|
@@ -4649,30 +4676,34 @@ a.bubble { color: inherit; text-decoration: none; }
|
|
|
4649
4676
|
}
|
|
4650
4677
|
.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)); }
|
|
4651
4678
|
.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; }
|
|
4652
|
-
/*
|
|
4653
|
-
column, and the title's lines wrap round
|
|
4654
|
-
|
|
4655
|
-
|
|
4656
|
-
|
|
4657
|
-
|
|
4658
|
-
|
|
4659
|
-
|
|
4660
|
-
|
|
4661
|
-
.head:not(.head--centre):has(> :is(.lead, .avatar, .avatar-stack):first-child + .words__title + .words__meta):has(> .icon-btn ~ .icon-btn):not(:has(> :nth-child(n + 3):not(.words__meta, .icon-btn), > .icon-btn ~ .icon-btn ~ .icon-btn, > .icon-btn:is(.icon-btn--lg, .icon-btn--xl), > .icon-btn--sm ~ .icon-btn:not(.icon-btn--sm), > .icon-btn:not(.icon-btn--sm) ~ .icon-btn--sm)) { --_head-ends: 2; }
|
|
4662
|
-
.head:not(.head--centre):has(> :is(.lead, .avatar, .avatar-stack):first-child + .words__title + .words__meta):has(> .icon-btn):not(:has(> :nth-child(n + 3):not(.words__meta, .icon-btn), > .icon-btn ~ .icon-btn ~ .icon-btn, > .icon-btn:is(.icon-btn--lg, .icon-btn--xl), > .icon-btn--sm ~ .icon-btn:not(.icon-btn--sm), > .icon-btn:not(.icon-btn--sm) ~ .icon-btn--sm)) > .icon-btn { grid-column: 2; grid-row: 1; justify-self: end; margin-inline-start: 0; }
|
|
4663
|
-
.head:not(.head--centre):has(> :is(.lead, .avatar, .avatar-stack):first-child + .words__title + .words__meta):has(> .icon-btn):not(:has(> :nth-child(n + 3):not(.words__meta, .icon-btn), > .icon-btn ~ .icon-btn ~ .icon-btn, > .icon-btn:is(.icon-btn--lg, .icon-btn--xl), > .icon-btn--sm ~ .icon-btn:not(.icon-btn--sm), > .icon-btn:not(.icon-btn--sm) ~ .icon-btn--sm)) > .icon-btn:has(~ .icon-btn) { margin-inline-end: calc(var(--_head-end) + var(--head-col-gap, var(--sp-3))); }
|
|
4664
|
-
.head:not(.head--centre):has(> :is(.lead, .avatar, .avatar-stack):first-child + .words__title + .words__meta):has(> .icon-btn):not(:has(> :nth-child(n + 3):not(.words__meta, .icon-btn), > .icon-btn ~ .icon-btn ~ .icon-btn, > .icon-btn:is(.icon-btn--lg, .icon-btn--xl), > .icon-btn--sm ~ .icon-btn:not(.icon-btn--sm), > .icon-btn:not(.icon-btn--sm) ~ .icon-btn--sm)) > .words__title {
|
|
4679
|
+
/* the ends in the corner (Lh 2026-10-28: round buttons first; the same day any end, an End's words, a Btn sm): with a meta, whatever follows the
|
|
4680
|
+
title stands in the top-right corner OVER the title's column, and the title's lines wrap round it as round a float — a line past the ends'
|
|
4681
|
+
height runs the full width under them; the meta runs under all. The room is the Words' own .words__room (above): an unseen, inert copy of
|
|
4682
|
+
the ends that the component renders at the start of the title, floated, so it is exactly as wide and as tall as the ends whatever they say.
|
|
4683
|
+
The DOM order is untouched: the title is read first, the copy by nobody. No meta: no room, the centred line (below). The ends take the four
|
|
4684
|
+
spare columns in order, so the title can span them.
|
|
4685
|
+
<h2 class="words__title"><span class="words__room" aria-hidden="true" inert>…copies…</span>A long title</h2> */
|
|
4686
|
+
.head:not(.head--centre):has(> :is(.lead, .avatar, .avatar-stack):first-child + .words__title > .words__room) > .words__title {
|
|
4687
|
+
grid-column: 2 / -1;
|
|
4665
4688
|
/* WebKit draws a float inside the -webkit-box line clamp as a box of its own ABOVE the words, so this title is a plain block: cut at
|
|
4666
4689
|
--head-title-lines by its height (whole lines, no "…") */
|
|
4667
4690
|
display: flow-root;
|
|
4668
4691
|
max-height: calc(var(--head-title-lines, 3) * 1lh + var(--_mark-room) + var(--_mark-foot));
|
|
4669
4692
|
}
|
|
4670
|
-
.head:not(.head--centre):has(> :is(.lead, .avatar, .avatar-stack):first-child + .words__title
|
|
4671
|
-
|
|
4672
|
-
|
|
4673
|
-
|
|
4674
|
-
|
|
4675
|
-
|
|
4693
|
+
.head:not(.head--centre):has(> :is(.lead, .avatar, .avatar-stack):first-child + .words__title > .words__room) > .words__title > .words__room { display: flex; gap: var(--head-col-gap, var(--sp-3)); padding-inline-start: var(--head-col-gap, var(--sp-3)); }
|
|
4694
|
+
.head:not(.head--centre):has(> :is(.lead, .avatar, .avatar-stack):first-child + .words__title > .words__room) > :nth-child(4) { grid-column: 3; }
|
|
4695
|
+
.head:not(.head--centre):has(> :is(.lead, .avatar, .avatar-stack):first-child + .words__title > .words__room) > :nth-child(5) { grid-column: 4; }
|
|
4696
|
+
.head:not(.head--centre):has(> :is(.lead, .avatar, .avatar-stack):first-child + .words__title > .words__room) > :nth-child(6) { grid-column: 5; }
|
|
4697
|
+
.head:not(.head--centre):has(> :is(.lead, .avatar, .avatar-stack):first-child + .words__title > .words__room) > :nth-child(7) { grid-column: 6; }
|
|
4698
|
+
/* an End of words on the title's FIRST line (Lh 2026-10-28): the ends stand at the top, so an End's caption and its icon are centred in the
|
|
4699
|
+
first line of the title (its leading, rounded as the type rounds it), not at the head's top. Its copy in the room moves with it, so the room
|
|
4700
|
+
stays as tall as the ends and the second line still runs the full width. A round IconBtn or a Btn sm is taller than a line: it keeps the top.
|
|
4701
|
+
--_line-h: the title's line, from its level's tokens (h2, or h1 / display when the Words says so) */
|
|
4702
|
+
.head:not(.head--centre):has(> :is(.lead, .avatar, .avatar-stack):first-child + .words__title + .words__meta) { --_line-h: round(down, calc(var(--lh-h2) * var(--fs-h2)), 1px); }
|
|
4703
|
+
.head:not(.head--centre):has(> :is(.lead, .avatar, .avatar-stack):first-child + .words__title + .words__meta):has(> .words__title.t-h1) { --_line-h: round(down, calc(var(--lh-h1) * var(--fs-h1)), 1px); }
|
|
4704
|
+
.head:not(.head--centre):has(> :is(.lead, .avatar, .avatar-stack):first-child + .words__title + .words__meta):has(> .words__title.t-display) { --_line-h: round(down, calc(var(--lh-display) * var(--fs-display)), 1px); }
|
|
4705
|
+
.head:not(.head--centre):has(> :is(.lead, .avatar, .avatar-stack):first-child + .words__title + .words__meta) > .end:not(:has(> .t-title)), .head:not(.head--centre):has(> :is(.lead, .avatar, .avatar-stack):first-child + .words__title + .words__meta) > .words__title > .words__room > .end:not(:has(> .t-title)) { margin-block-start: calc((var(--_line-h) - round(down, calc(var(--lh-caption) * var(--fs-caption)), 1px)) / 2); }
|
|
4706
|
+
.head:not(.head--centre):has(> :is(.lead, .avatar, .avatar-stack):first-child + .words__title + .words__meta) > .end:not(:has(> .t-title)) + .icon, .head:not(.head--centre):has(> :is(.lead, .avatar, .avatar-stack):first-child + .words__title + .words__meta) > .words__title > .words__room > .end:not(:has(> .t-title)) + .icon { --icon-margin: calc((var(--_line-h) - var(--end-icon-size, var(--icon-xs))) / 2) 0; }
|
|
4676
4707
|
/* 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) */
|
|
4677
4708
|
.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; }
|
|
4678
4709
|
.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; }
|