Public: anyone can read this; the crew can change it.

Motion that feels native: one strong ease-out, transform and opacity only, interruptible enters, no motion on frequent actions, lint-enforced #16816

Merged opened this

Check · Review · Land · Live done — Landed and live in production.

Merged

motion-rules → main 0 commits

  • Merged. motion-rules was merged into main as c5744d4.

Review

Sign in to review this change.
18 files changed +428 −147
docs/design/feel-allow.json added +26
@@ -0,0 +1,26 @@
1 [
2 {
3 "file": "src/web/style/base.ts",
4 "rule": "prop",
5 "text": "background-color 200ms var(--ease), color 200ms var(--ease)",
6 "why": "The theme switcher's one sweep: colours cross-fade once, on a rare and deliberate choice, for the 200 ms the class is on; snapping every surface at once reads as a flash."
7 },
8 {
9 "file": "src/web/pages/talk_client.ts",
10 "rule": "prop",
11 "text": "height var(--dur-3) var(--ease), padding var(--dur-3) var(--ease)",
12 "why": "The confirm dock collapsing after an answer: its height is what moves the composer and the thread back down. A scaleY with a clip would leave the space standing until the end and then jump, which is the shift this avoids."
13 },
14 {
15 "file": "src/web/pages/home_flow_style.ts",
16 "rule": "slow",
17 "text": "hf-arrive 900ms",
18 "why": "A highlight that marks a tile that arrived while you were reading, not an answer to anything you did; at 300 ms it is over before the eye gets there."
19 },
20 {
21 "file": "src/web/studio/style.ts",
22 "rule": "slow",
23 "text": "studio-flash 1.1s",
24 "why": "The same: a card the live client changed under you flashes once so you see which; nothing waits on it and it never moves anything."
25 }
26 ]
docs/design/sections/4-space-radius-motion.md +26 −4
@@ -14,10 +14,32 @@ nest: 0
1414 all — that is where the double line at the end of a list comes from.
1515 - **Density**: dense rows (files, commits, issues) 40px; anything touchable is
1616 ≥44px under `@media (pointer: coarse)` — via padding, so text stays centered.
17 - **Motion**: 100–200ms, `cubic-bezier(.2,0,0,1)`, enter only. Only `color`,
18 `background-color`, `border-color`, `opacity` and `transform` are ever
19 animated. Never `height`, never `box-shadow` on scroll. Everything is inside
20 the `prefers-reduced-motion` kill switch. `bun scripts/design-lint.ts` refuses
17 - **Motion has a job, or it goes** (after Emil Kowalski's rules): feedback, where a
18 thing came from, or a change of state. Nothing moves on what a person does a
19 hundred times a day or from the keyboard: the palette opens and closes still,
20 your own sent message lands still, toggles snap. What arrives on its own (a
21 toast, someone else's reply in Talk, a live row) keeps its enter.
22 - **Curves and times**: one strong ease-out, `--ease` (`cubic-bezier(.23,1,.32,1)`),
23 for anything entering or leaving; `--ease-move` (ease-in-out) only for a thing
24 moving on screen; never ease-in. A press `--dur-1` (100ms), a hover, a tooltip or a
25 popover `--dur-2` (140ms), an arrival `--dur-3` (200ms); nothing over 300ms.
26 - **Physics**: only `transform` and `opacity` are animated; a colour, a size or a
27 place changes at once. Nothing grows from nothing: an enter starts at
28 `scale(.95)`, from its trigger's corner (`transform-origin`) for a popover or a
29 menu, centred for a modal. A button gives under the press (`:active` `scale(.97)`).
30 Anything a person can reverse (a menu, a dialog, a card) enters by a transition
31 from `@starting-style`, so it can be cut short; where the browser does not know
32 the at-rule the element simply appears whole. A peek card waits 400ms the first
33 time, then the next opens at once while one was just open.
34 - **Hover** lives inside `@media (hover: hover) and (pointer: fine)`, so a tap never
35 leaves one stuck. Reduced motion keeps every fade and drops every travel
36 (`transition-property: opacity`), and collapses animations.
37 - `src/design/feel.ts`, run by `bun scripts/design-lint.ts`, refuses ease-in, more
38 than 300ms on a transition or a one-shot animation (a loop is an indicator), a
39 `scale(0)`, a transition of anything but `transform` and `opacity`, and a hover
40 outside the hover query. The real exceptions are in `docs/design/feel-allow.json`,
41 each with its reason, and one that no longer finds its rule fails too.
42 - Everything is inside the `prefers-reduced-motion` kill switch. `bun scripts/design-lint.ts` refuses
2143 an `animation` or `transition` over 100ms (naming its selector) unless a
2244 `@media (prefers-reduced-motion: reduce)` rule in the same sheet turns it off,
2345 or it sits inside `(prefers-reduced-motion: no-preference)`. It reads the
docs/design/size-budget.json +28 −28
@@ -1,78 +1,78 @@
11 {
22 "/": {
3 "js": 24320,
4 "css": 50432
3 "js": 24576,
4 "css": 51712
55 },
66 "/explore": {
7 "js": 24064,
8 "css": 50432
7 "js": 24320,
8 "css": 51712
99 },
1010 "/map": {
1111 "js": 31744,
12 "css": 51968
12 "css": 53248
1313 },
1414 "/:owner/:name": {
1515 "js": 41216,
16 "css": 50432
16 "css": 51712
1717 },
1818 "/changelog": {
1919 "js": 29696,
20 "css": 50432
20 "css": 51712
2121 },
2222 "/:owner/:name/next": {
23 "js": 25856,
24 "css": 50688
23 "js": 26112,
24 "css": 51968
2525 },
2626 "/:owner/:name/space": {
2727 "js": 33024,
28 "css": 51456
28 "css": 52736
2929 },
3030 "/:owner/:name/space.json": {
3131 "js": 0,
3232 "css": 0
3333 },
3434 "/maintenance": {
35 "js": 24064,
36 "css": 50432
35 "js": 24320,
36 "css": 51712
3737 },
3838 "/pricing": {
39 "js": 24064,
40 "css": 50432
39 "js": 24320,
40 "css": 51712
4141 },
4242 "/forges/new": {
43 "js": 24064,
44 "css": 50432
43 "js": 24320,
44 "css": 51712
4545 },
4646 "/claim": {
4747 "js": 27136,
48 "css": 50432
48 "css": 51712
4949 },
5050 "/templates": {
51 "js": 24064,
52 "css": 50432
51 "js": 24320,
52 "css": 51712
5353 },
5454 "/system": {
55 "js": 25856,
56 "css": 50432
55 "js": 26112,
56 "css": 51712
5757 },
5858 "/feed": {
5959 "js": 39168,
60 "css": 50432
60 "css": 51712
6161 },
6262 "/board": {
63 "js": 28928,
64 "css": 50432
63 "js": 29184,
64 "css": 51712
6565 },
6666 "/fleet": {
67 "js": 24064,
68 "css": 50432
67 "js": 24320,
68 "css": 51712
6969 },
7070 "/talk": {
7171 "js": 42496,
72 "css": 56832
72 "css": 58112
7373 },
7474 "/:owner/:name/pulls/:number": {
7575 "js": 34560,
76 "css": 50432
76 "css": 51712
7777 }
7878 }
scripts/design-lint.ts +2 −1
@@ -72,6 +72,7 @@ import { dictateFindings } from "../src/design/dictate.ts";
7272 import { STRANGER_NEVER_SEES } from "../src/design/first_five_minutes.ts";
7373 import { contrastFindings } from "../src/design/contrast.ts";
7474 import { compareLayout, layoutCounts, scanLayout } from "../src/design/layout.ts";
75 import { scanFeel, staleAllows } from "../src/design/feel.ts";
7576 import { motionFindings } from "../src/design/motion.ts";
7677 import { PHONE_PX, widthFindings } from "../src/design/width.ts";
7778 import { cssBlocksAt, scanOverlay, sourceFiles } from "../src/design/overlay.ts";
@@ -671,7 +672,7 @@ if (import.meta.main) {
671672 } else {
672673 const base: Baseline = JSON.parse(readFileSync(join(root, BASELINE), "utf8"));
673674 const debt: QuietDebt = JSON.parse(readFileSync(join(root, QUIET_DEBT), "utf8"));
674 const problems = [...compare(base, now, designText(root), areaFiles(root)), ...compareQuiet(debt, scanQuiet(root)), ...scanBanner(root), ...compareLayout(base.layout ?? {}, scanLayout(root)), ...scanOverlay(root), ...scanCards(root), ...scanStranger(root), ...scanMotion(root), ...scanWidth(root), ...scanDictate(root), ...contrastFindings()];
675 const problems = [...compare(base, now, designText(root), areaFiles(root)), ...compareQuiet(debt, scanQuiet(root)), ...scanBanner(root), ...compareLayout(base.layout ?? {}, scanLayout(root)), ...scanOverlay(root), ...scanCards(root), ...scanStranger(root), ...scanMotion(root), ...scanFeel(root), ...staleAllows(root).map((a) => `${a.file}: ${a.rule} "${a.text}" is allowed in docs/design/feel-allow.json but no longer found: take it out`), ...scanWidth(root), ...scanDictate(root), ...contrastFindings()];
675676 for (const p of problems) console.error(p);
676677 if (problems.length) process.exit(1);
677678 console.log("design: no colour, size or component added outside the system");
src/design/feel.ts added +133
@@ -0,0 +1,133 @@
1 /**
2 * How motion feels (the owner's "why your UI feels cheap" rules, after Emil Kowalski): read from
3 * every `/* css *\/` template in src/web. Plain data in, plain data out: `feelIn` takes one file's
4 * text and a path; `scanFeel` the tree and the allow-list.
5 *
6 * easein `ease-in` in a transition or an animation: UI enters and leaves with ease-out (the
7 * `--ease` token); ease-in-out is for a move on screen (`--ease-move`)
8 * slow a transition or a one-shot animation longer than 300 ms; a loop (`infinite`) is an
9 * indicator, not a transition, and is not timed here
10 * scale0 `scale(0)`: nothing grows from nothing; start at `scale(.95)`
11 * prop a transition of anything but `transform` and `opacity` (or `all`): only those two are
12 * cheap to draw and read as motion, so a colour, a size or a place changes at once
13 * hover a `:hover` rule outside `@media (hover: hover) and (pointer: fine)`: on touch a hover
14 * sticks after the tap
15 *
16 * Not a ratchet: none is allowed but what `docs/design/feel-allow.json` names, each with its
17 * reason.
18 */
19 import { readFileSync } from "node:fs";
20 import { join, relative } from "node:path";
21 import { cssBlocksAt, sourceFiles } from "./overlay.ts";
22
23 export type FeelRule = "easein" | "slow" | "scale0" | "prop" | "hover";
24 export type FeelFinding = { line: number; rule: FeelRule; text: string };
25 /** A real exception: the file, the rule, a piece of the finding's text, and why. */
26 export type FeelAllow = { file: string; rule: FeelRule; text: string; why: string };
27
28 export const SLOWEST_MS = 300;
29 export const FEEL_ALLOW = "docs/design/feel-allow.json";
30
31 /** One line each: the rule and the fix. */
32 export const FEEL_FIX: Record<FeelRule, string> = {
33 easein: "UI never eases in: var(--ease) for entering and leaving, var(--ease-move) for a move on screen",
34 slow: `UI motion is ${SLOWEST_MS} ms at most: a button 100–160, a tooltip 125–200, a popover 150–250`,
35 scale0: "nothing grows from nothing: start at scale(.95)",
36 prop: "transition only transform and opacity: a colour, a size or a place changes at once",
37 hover: "a hover belongs inside @media (hover: hover) and (pointer: fine): on touch it sticks",
38 };
39
40 const lineOf = (text: string, at: number) => text.slice(0, at).split("\n").length;
41 const ms = (n: string, unit: string): number => (unit === "s" ? Number(n) * 1000 : Number(n));
42 const CHEAP = /^(transform|opacity|none|translate|scale|rotate)$/;
43
44 /** Each comma-separated group of a transition's value, without what is inside parentheses. */
45 const groups = (value: string): string[] => {
46 const out: string[] = [];
47 let depth = 0;
48 let cur = "";
49 for (const ch of value) {
50 if (ch === "(") depth++;
51 if (ch === ")") depth--;
52 if (ch === "," && depth === 0) {
53 out.push(cur.trim());
54 cur = "";
55 } else cur += ch;
56 }
57 if (cur.trim() !== "") out.push(cur.trim());
58 return out;
59 };
60
61 export function feelIn(text: string): FeelFinding[] {
62 const out: FeelFinding[] = [];
63 for (const { css, at } of cssBlocksAt(text)) {
64 // Comments and the template's own `${…}` holes say nothing about motion.
65 const code = css.replace(/\/\*[\s\S]*?\*\//g, (c) => c.replace(/[^\n]/g, " ")).replace(/\$\{[^}]*\}/g, (c) => c.replace(/[^\n]/g, " "));
66 // The at-rules and selectors open around each position: walk the braces once.
67 const stack: string[] = [];
68 let start = 0;
69 for (let i = 0; i < code.length; i++) {
70 const ch = code[i];
71 if (ch === "{") {
72 const prelude = code.slice(start, i).trim();
73 stack.push(prelude);
74 if (prelude.includes(":hover") && !prelude.startsWith("@") && !stack.some((p) => /^@media\b[^{]*hover:\s*hover/.test(p)))
75 out.push({ line: lineOf(text, at + start + (code.slice(start, i).length - code.slice(start, i).trimStart().length)), rule: "hover", text: prelude.replace(/\s+/g, " ") });
76 start = i + 1;
77 } else if (ch === "}") {
78 stack.pop();
79 start = i + 1;
80 } else if (ch === ";") start = i + 1;
81 }
82 for (const m of code.matchAll(/([a-z-]+)\s*:\s*([^;{}]+)/gi)) {
83 const prop = m[1]!.toLowerCase();
84 const value = m[2]!.replace(/!important/i, "").trim();
85 if (!/^(transition|transition-property|transition-duration|transition-timing-function|animation|animation-duration|animation-timing-function|transform|scale)$/.test(prop)) continue;
86 const line = lineOf(text, at + m.index!);
87 const add = (rule: FeelRule) => out.push({ line, rule, text: `${prop}: ${value}` });
88 if (/\bscale[XYZ3d]*\(\s*0(\.0+)?\s*[,)]/.test(value) || (prop === "scale" && /^0(\.0+)?$/.test(value))) add("scale0");
89 if (prop.startsWith("transition") || prop.startsWith("animation")) {
90 if (/\bease-in\b(?!-out)/.test(value)) add("easein");
91 const loop = prop.startsWith("animation") && /\binfinite\b/.test(value);
92 if (!loop && !prop.endsWith("delay") && [...value.matchAll(/(?<![\w.-])(\d*\.?\d+)(ms|s)\b/g)].some((d, k) => (prop.startsWith("animation") || prop === "transition" ? k === 0 : true) && ms(d[1]!, d[2]!) > SLOWEST_MS)) add("slow");
93 }
94 if (prop === "transition" && value !== "none" && !value.startsWith("none ")) {
95 for (const g of groups(value)) {
96 const first = g.split(/\s+/)[0]!;
97 if (/^var\(/.test(first) || /^\d/.test(first)) continue;
98 if (!CHEAP.test(first)) {
99 add("prop");
100 break;
101 }
102 }
103 }
104 if (prop === "transition-property" && groups(value).some((g) => !CHEAP.test(g))) add("prop");
105 }
106 }
107 return out.sort((a, b) => a.line - b.line);
108 }
109
110 /**
111 * Every finding in the tree that the allow-list does not name, as one line each: file:line, rule,
112 * fix.
113 */
114 export function scanFeel(root: string): string[] {
115 const allow = JSON.parse(readFileSync(join(root, FEEL_ALLOW), "utf8")) as FeelAllow[];
116 const out: string[] = [];
117 for (const f of sourceFiles(root)) {
118 const file = relative(root, f).replace(/\\/g, "/");
119 for (const x of feelIn(readFileSync(f, "utf8")))
120 if (!allow.some((a) => a.file === file && a.rule === x.rule && x.text.includes(a.text))) out.push(`${file}:${x.line} ${x.rule}: ${x.text} → ${FEEL_FIX[x.rule]}`);
121 }
122 return out;
123 }
124
125 /** Each allow-list entry that no longer names a finding: an exception that outlived its reason. */
126 export function staleAllows(root: string): FeelAllow[] {
127 const allow = JSON.parse(readFileSync(join(root, FEEL_ALLOW), "utf8")) as FeelAllow[];
128 const found = sourceFiles(root).flatMap((f) => {
129 const file = relative(root, f).replace(/\\/g, "/");
130 return feelIn(readFileSync(f, "utf8")).map((x) => ({ file, ...x }));
131 });
132 return allow.filter((a) => !found.some((x) => x.file === a.file && x.rule === a.rule && x.text.includes(a.text)));
133 }
src/design/motion.ts +11 −3
@@ -2,7 +2,8 @@
22 * Calm (#12418): the page does not move unless asked. A stylesheet rule whose
33 * `animation` or `transition` runs longer than 100 ms is refused unless a
44 * `@media (prefers-reduced-motion: reduce)` rule in the same sheet turns it
5 * off — the selector itself, or a universal `*` that shortens every duration.
5 * off — the selector itself, or a universal `*` that shortens every duration (or,
6 * for a transition, keeps only its fade: `transition-property: opacity`).
67 * Plain data in (one sheet's text), plain findings out.
78 */
89
@@ -54,10 +55,17 @@ function longest(value: string): number {
5455 return max;
5556 }
5657
57 /** Does a reduced-motion rule's body stop `property` (none, or a duration of 100 ms or less)? */
58 /**
59 * Does a reduced-motion rule's body stop `property` (none, or a duration of 100 ms or less; a
60 * transition also when only its fade is left, which moves nothing)?
61 */
5862 function stops(body: string, property: "animation" | "transition"): boolean {
59 for (const d of body.matchAll(new RegExp(`(?<![\\w-])${property}(-duration|-name)?\\s*:\\s*([^;}]*)`, "g"))) {
63 for (const d of body.matchAll(new RegExp(`(?<![\\w-])${property}(-duration|-name|-property)?\\s*:\\s*([^;}]*)`, "g"))) {
6064 const v = d[2]!.replace(/!important/i, "").trim();
65 if (d[1] === "-property") {
66 if (property === "transition" && v === "opacity") return true;
67 continue;
68 }
6169 if (d[1] === "-name" || (!d[1] && /^none\b/.test(v))) return true;
6270 if (d[1] === "-duration" || (!d[1] && v)) return longest(v) <= 100;
6371 }
src/web/pages/account.ts +1 −1
@@ -549,7 +549,7 @@ const galleryCss = /* css */ `
549549 border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--card);
550550 font-size: 14px; font-weight: 550;
551551 }
552 .theme-card:hover { border-color: var(--border-strong); }
552 @media (hover: hover) and (pointer: fine) { .theme-card:hover { border-color: var(--border-strong); } }
553553 .theme-card[aria-pressed="true"] { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
554554 .theme-card small { display: block; font-weight: 400; }
555555 .theme-look { display: flex; height: 76px; overflow: hidden; border: 1px solid var(--border); border-radius: var(--radius-sm); }
src/web/pages/build_info.ts +2 −1
@@ -183,7 +183,8 @@ export const INFO_CSS = /* css */ `
183183 .it-info p{margin:0;font-size:13px}
184184 .it-info .prose.it-body{padding:0;font-size:13px;line-height:1.5}
185185 .it-edit{margin-left:auto;background:none;border:0;padding:0;color:var(--muted-fg);font:inherit;font-size:11.5px;font-weight:400;cursor:pointer}
186 .it-edit:hover,.it-edit:focus-visible{color:var(--accent);text-decoration:underline}
186 .it-edit:focus-visible {color:var(--accent);text-decoration:underline}
187 @media (hover: hover) and (pointer: fine) { .it-edit:hover {color:var(--accent);text-decoration:underline} }
187188 @media (forced-colors: active){.it-edit:focus-visible{outline:1px solid Highlight}}
188189 .it-none .it-edit{margin-left:0;font-size:inherit}
189190 .it-edit[hidden],.it-ed[hidden],.it-saved[hidden],.it-info [data-view][hidden],.it-none[hidden]{display:none}
src/web/pages/home_flow_style.ts +9 −9
@@ -28,7 +28,7 @@ export const homeFlowCss = /* css */ `
2828 .hf-need-first { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
2929 .hf-figs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); overflow: hidden; border: 1px solid var(--border); border-radius: var(--radius); background: var(--card); box-shadow: var(--shadow-1); }
3030 .hf-fig { position: relative; display: flex; flex-direction: column; gap: 2px; min-width: 0; min-height: 44px; padding: 12px 16px; background: var(--card); box-shadow: 0 0 0 0.5px var(--border); }
31 .hf-fig:hover { background: var(--muted); color: var(--fg); }
31 @media (hover: hover) and (pointer: fine) { .hf-fig:hover { background: var(--muted); color: var(--fg); } }
3232 .hf-fig:last-child:nth-child(odd) { grid-column: 1 / -1; }
3333 .hf-fig-label { font-size: var(--fs-min); color: var(--muted-fg); }
3434 .hf-fig-value { font-size: 20px; font-weight: 600; line-height: 28px; letter-spacing: -0.01em; }
@@ -55,11 +55,11 @@ export const homeFlowCss = /* css */ `
5555
5656 /* ---- a tile ---- */
5757 .tile { position: relative; border: 1px solid var(--border); border-radius: var(--radius); background: var(--card); box-shadow: var(--shadow-1); }
58 .tile:hover { border-color: var(--border-strong); }
58 @media (hover: hover) and (pointer: fine) { .tile:hover { border-color: var(--border-strong); } }
5959 .tile[data-state="active"] { border-left: 2px solid var(--accent); }
6060 .tile[data-state="done"] { border-left: 2px solid var(--success); }
6161 .tile-link { display: flex; flex-direction: column; gap: 4px; min-height: 44px; padding: 8px 12px; color: var(--fg); }
62 .tile-link:hover { color: var(--fg); }
62 @media (hover: hover) and (pointer: fine) { .tile-link:hover { color: var(--fg); } }
6363 .tile-top { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; min-width: 0; font-size: var(--fs-min); line-height: 16px; }
6464 .tile-app { min-width: 0; overflow: hidden; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
6565 .tile-no { font-weight: 400; color: var(--muted-fg); }
@@ -71,7 +71,7 @@ export const homeFlowCss = /* css */ `
7171 .tile[data-new] { animation: hf-arrive 900ms var(--ease); }
7272 .lane-more { margin: 0; padding-inline: 4px; font-size: 13px; }
7373 .lane-more a, .lane-toggle { display: block; color: var(--muted-fg); }
74 .lane-more a:hover, .lane-toggle:hover { color: var(--accent); }
74 @media (hover: hover) and (pointer: fine) { .lane-more a:hover, .lane-toggle:hover { color: var(--accent); } }
7575 .lane-more span { align-items: center; min-height: 44px; }
7676 .lane-more-sm { display: inline-flex; }
7777 .lane-more-md, .lane-more-lg { display: none; }
@@ -136,7 +136,7 @@ export const homeFlowCss = /* css */ `
136136 /* ---- the view switch, and the table ---- */
137137 .hf-views { display: inline-flex; gap: 2px; padding: 2px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--muted); }
138138 .hf-views a { display: inline-flex; align-items: center; min-height: 44px; padding-inline: 16px; border-radius: var(--radius-sm); font-weight: 500; color: var(--muted-fg); }
139 .hf-views a:hover { color: var(--fg); }
139 @media (hover: hover) and (pointer: fine) { .hf-views a:hover { color: var(--fg); } }
140140 .hf-views a[aria-current="page"] { background: var(--card); box-shadow: var(--shadow-1); color: var(--fg); }
141141 .hf-head .hf-title { margin-right: auto; }
142142 .tb-search { display: flex; align-items: center; gap: 8px; }
@@ -147,7 +147,7 @@ export const homeFlowCss = /* css */ `
147147 .tb-sorts { display: none; }
148148 .tb-chiplabel { min-width: 40px; font-size: var(--fs-min); color: var(--muted-fg); }
149149 .tb-chip { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding-inline: 12px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--card); font-size: 13px; color: var(--fg); }
150 .tb-chip:hover { border-color: var(--border-strong); color: var(--fg); }
150 @media (hover: hover) and (pointer: fine) { .tb-chip:hover { border-color: var(--border-strong); color: var(--fg); } }
151151 .tb-chip[aria-pressed="true"] { border-color: var(--primary); background: var(--primary); color: var(--primary-fg); }
152152 .tb-chipn { font-size: var(--fs-min); color: var(--muted-fg); }
153153 .tb-chip[aria-pressed="true"] .tb-chipn { color: inherit; opacity: 0.8; }
@@ -172,7 +172,7 @@ export const homeFlowCss = /* css */ `
172172 .tb-pick { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; padding: 0; border: 0; background: none; cursor: pointer; }
173173 .tb-pick::before { content: ""; width: 18px; height: 18px; border: 1.5px solid var(--border-strong); border-radius: var(--radius-sm); background: var(--card); }
174174 .tb-pick[aria-checked="true"]::before { border-color: var(--accent); background: var(--accent); box-shadow: inset 0 0 0 3px var(--card); }
175 .tb-pick:hover::before { border-color: var(--accent); }
175 @media (hover: hover) and (pointer: fine) { .tb-pick:hover::before { border-color: var(--accent); } }
176176 .tb .tb-sel { width: 44px; padding: 0; }
177177 .tb-row:has(.tb-pick[aria-checked="true"]) { background: color-mix(in srgb, var(--accent) 8%, var(--card)); }
178178 .tb-row[hidden] { display: none; }
@@ -180,7 +180,7 @@ export const homeFlowCss = /* css */ `
180180 .tb-app { white-space: nowrap; font-weight: 600; }
181181 .tb-no { font-weight: 400; color: var(--muted-fg); }
182182 .tb-what a { color: var(--fg); }
183 .tb-what a:hover { color: var(--accent); }
183 @media (hover: hover) and (pointer: fine) { .tb-what a:hover { color: var(--accent); } }
184184 .tb-state .dot { margin-right: 8px; vertical-align: 1px; }
185185 .tb-hint, .tb-lane { color: var(--muted-fg); }
186186 .tb-time, .tb-age { white-space: nowrap; }
@@ -215,7 +215,7 @@ export const homeFlowCss = /* css */ `
215215 .fg-hint { font-size: var(--fs-min); color: var(--muted-fg); }
216216 .fg-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
217217 .fg-card { display: flex; flex-direction: column; gap: 4px; min-width: 0; padding: 12px 16px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--card); box-shadow: var(--shadow-1); color: var(--fg); }
218 a.fg-card:hover { border-color: var(--border-strong); color: var(--fg); }
218 @media (hover: hover) and (pointer: fine) { a.fg-card:hover { border-color: var(--border-strong); color: var(--fg); } }
219219 .fg-card[data-tone="attn"] { border-color: color-mix(in srgb, var(--attn) 40%, var(--border)); }
220220 .fg-card[data-tone="attn"] .fg-n { color: var(--attn); }
221221 .fg-label { margin: 0; font-size: var(--fs-min); font-weight: 400; color: var(--muted-fg); }
src/web/pages/map.ts +5 −5
@@ -1231,7 +1231,7 @@ export const mapCss = /* css */ `${factsCss}
12311231
12321232 /* ---- cards ---- */
12331233 .map-node { cursor: pointer; outline: none; }
1234 .map-card { fill: var(--card); stroke: var(--border); stroke-width: 1; transition: stroke 120ms var(--ease), fill 120ms var(--ease); }
1234 .map-card { fill: var(--card); stroke: var(--border); stroke-width: 1; }
12351235 .map-node[data-state="ready"] .map-card { stroke: var(--border-strong); }
12361236 .map-node[data-state="working"] .map-card { stroke: var(--accent); }
12371237 .map-node[data-state="blocked"] .map-card { fill: var(--muted); }
@@ -1241,15 +1241,15 @@ export const mapCss = /* css */ `${factsCss}
12411241 .map-card.map-new { stroke-width: 2; stroke-dasharray: 2 2; }
12421242 .map-new-dot { fill: var(--fg); }
12431243 .map-growth { margin: 0 0 var(--gap, 12px); }
1244 .map-node:hover .map-card { stroke: var(--border-strong); }
1245 .map-node[data-state="working"]:hover .map-card { stroke: var(--accent); }
1244 @media (hover: hover) and (pointer: fine) { .map-node:hover .map-card { stroke: var(--border-strong); }
1245 .map-node[data-state="working"]:hover .map-card { stroke: var(--accent); } }
12461246 .map-node:focus-visible .map-card { stroke: var(--accent); stroke-width: 2; }
12471247 .map-canvas:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
12481248 /* A soft outer ring, static: any animation inside a large inline SVG
12491249 repaints the whole drawing every frame, whatever property it touches. */
12501250 .map-breath { fill: none; stroke: var(--accent); stroke-width: 1.5; opacity: .35; }
1251 .map-title { font-size: 12.5px; font-weight: 560; fill: var(--fg); transition: fill 120ms var(--ease); }
1252 .map-node:hover .map-title { fill: var(--accent); }
1251 .map-title { font-size: 12.5px; font-weight: 560; fill: var(--fg); }
1252 @media (hover: hover) and (pointer: fine) { .map-node:hover .map-title { fill: var(--accent); } }
12531253 .map-node[data-state="done"] .map-title, .map-node[data-state="done"] .map-meta, .map-node[data-state="done"] .map-word { fill: var(--faint); }
12541254 .map-node[data-state="deferred"] .map-card { fill: none; stroke-dasharray: 4 3; }
12551255 .map-node[data-state="deferred"] .map-title { fill: var(--muted-fg); }
src/web/pages/talk_client.ts +5 −5
@@ -58,7 +58,7 @@ body:has(.talk-page) .topbar { background: var(--bg); backdrop-filter: none; -we
5858 .talk { display: flex; flex-direction: column; width: 100%; max-width: 46rem; margin: 0 auto; min-width: 0; min-height: calc(100dvh - var(--topbar-h)); }
5959 .talk-side, .talk-work, [data-view="list"] :is(.talk, .talk-work) { display: none; }
6060 [data-view="list"] .talk-side { display: block; padding: 12px 0; }
61 .talk-head { position: sticky; top: var(--topbar-h); z-index: 8; display: flex; flex-wrap: nowrap; align-items: center; gap: 4px; min-height: 2.75rem; padding-block: 2px; background: var(--bg); transition: transform var(--dur-2) var(--ease); }
61 .talk-head { position: sticky; top: var(--topbar-h); z-index: 8; display: flex; flex-wrap: nowrap; align-items: center; gap: 4px; min-height: 2.75rem; padding-block: 2px; background: var(--bg); transition: transform var(--dur-2) var(--ease-move); }
6262 .talk-head[data-away] { transform: translateY(-110%); }
6363 .talk-head[data-away]:is(:focus-within, :has(details[open])) { transform: none; }
6464 .talk-title { flex: 1 1 0; min-width: 3rem; margin: 0; font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@@ -149,7 +149,7 @@ body:has(.talk-page) .topbar { background: var(--bg); backdrop-filter: none; -we
149149 @keyframes talk-fade { from { opacity: 0; } }
150150
151151 @media (prefers-reduced-motion: no-preference) {
152 .talk:not([data-motion=reduced]) :is(.talk-log > [data-in], .talk-fold-list > [data-in], .talk-jump:not([hidden])) { animation: talk-in var(--dur-3) var(--ease); }
152 .talk:not([data-motion=reduced]) :is(.talk-log > [data-in]:not(.talk-person), .talk-fold-list > [data-in], .talk-jump:not([hidden])) { animation: talk-in var(--dur-3) var(--ease); }
153153 .talk:not([data-motion=reduced]) .talk-live [data-in] { animation: talk-fade var(--dur-3) var(--ease); }
154154 .talk:not([data-motion=reduced]) .talk-confirm[data-in] { animation: talk-in var(--dur-3) var(--ease); }
155155 .talk:not([data-motion=reduced]) .talk-confirms { transition: height var(--dur-3) var(--ease), padding var(--dur-3) var(--ease); }
@@ -177,7 +177,7 @@ body:has(.talk-page) .topbar { background: var(--bg); backdrop-filter: none; -we
177177 .talk-person > .talk-meta time { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
178178 .talk-act, .talk-copy { position: relative; width: 2rem; min-width: 2rem; height: 2rem; min-height: 2rem; padding: 0; color: var(--muted-fg); }
179179 .talk-copy { display: inline-flex; align-items: center; justify-content: center; padding: 0; background: none; border: 0; border-radius: var(--radius-sm); color: inherit; cursor: pointer; }
180 .talk-copy:hover { background: var(--muted); color: var(--fg); }
180 @media (hover: hover) and (pointer: fine) { .talk-copy:hover { background: var(--muted); color: var(--fg); } }
181181 @media (hover: hover) and (pointer: fine) {
182182 .talk-turn > :is(.talk-meta, .talk-acts) :is(.talk-copy, .talk-act):not(:focus-visible) { opacity: 0; transition: opacity var(--dur-2) var(--ease); }
183183 .talk-turn:is(:hover, :focus-within) > :is(.talk-meta, .talk-acts) :is(.talk-copy, .talk-act) { opacity: 1; }
@@ -188,7 +188,7 @@ body:has(.talk-page) .topbar { background: var(--bg); backdrop-filter: none; -we
188188 .talk-fold { margin-block: -4px; }
189189 [data-steps] + .talk-agent > .talk-steps { display: none; }
190190 .talk-fold > details > summary { position: relative; cursor: pointer; min-height: 2rem; display: inline-flex; align-items: center; gap: 6px; color: var(--muted-fg); }
191 .talk-fold > details > summary:hover { color: var(--fg); }
191 @media (hover: hover) and (pointer: fine) { .talk-fold > details > summary:hover { color: var(--fg); } }
192192 .talk-fold-list { list-style: none; margin: 0; margin-inline-start: 8px; padding: 0; padding-inline-start: 12px; border-inline-start: 2px solid var(--border); display: grid; gap: 2px; }
193193 .talk-steps { margin: 4px 0 0; }
194194 .talk-live .talk-steps:last-child, .talk-status:not(:empty), .talk-stage[data-busy] .talk-stage-note, .talk-crew-working { background: linear-gradient(90deg, var(--muted-fg) 40%, var(--fg) 50%, var(--muted-fg) 60%) 0 0 / 300% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; animation: talk-shine 2s linear infinite; }
@@ -221,7 +221,7 @@ body:has(.talk-page) .topbar { background: var(--bg); backdrop-filter: none; -we
221221 @media (max-width: 30rem) { .talk-suggest { margin-top: 16px; } .talk:has(.talk-hello) .talk-compose { padding-bottom: 16px; } .talk:has(.talk-hello) { padding-bottom: 10vh; } }
222222 .talk-suggest .btn { min-height: 2.75rem; border-radius: 999px; }
223223 .talk-compose { position: sticky; bottom: var(--kb, 0px); z-index: 8; padding: 8px 0 max(12px, env(safe-area-inset-bottom)); background: linear-gradient(transparent, var(--bg) 8px); }
224 .talk-box { display: grid; border: 1px solid var(--border-strong); border-radius: 24px; background: var(--card); box-shadow: var(--shadow-1); transition: border-color var(--dur-2) var(--ease); }
224 .talk-box { display: grid; border: 1px solid var(--border-strong); border-radius: 24px; background: var(--card); box-shadow: var(--shadow-1); }
225225 .talk-box:focus-within { border-color: var(--muted-fg); box-shadow: 0 0 0 3px color-mix(in srgb, var(--muted-fg) 22%, transparent); }
226226 .talk-box:has([aria-invalid="true"]) { border-color: var(--danger); }
227227 @media (prefers-reduced-motion: reduce) { .talk-box, .talk-head, .talk-turn :is(.talk-copy, .talk-act) { transition: none; } }
src/web/pick.ts +1 −1
@@ -75,7 +75,7 @@ export const pickCss = /* css */ `
7575 color: var(--fg); background: var(--muted); border: 1px solid var(--border);
7676 border-radius: var(--radius-sm);
7777 }
78 .pick-chip:hover { border-color: var(--border-strong); }
78 @media (hover: hover) and (pointer: fine) { .pick-chip:hover { border-color: var(--border-strong); } }
7979 .pick-bar .input { flex: 1; min-width: 160px; }
8080 .pick-list {
8181 max-height: 168px; overflow-y: auto; overscroll-behavior: contain;
src/web/style/base.ts +14 −11
@@ -47,10 +47,13 @@ export const base = /* css */ `
4747 --topbar-h: 56px;
4848 --page: 1120px;
4949 --measure: 72ch;
50 --ease: cubic-bezier(.2, 0, 0, 1);
51 /* One motion vocabulary: the code viewer's timings, named. A hover or a
52 focus is --dur-1 to --dur-2, a thing arriving --dur-3, and a pixel
53 figure changes frame every --beat (#10570). */
50 /* One strong curve for what enters and leaves (ease-out), one for a move
51 on screen (ease-in-out); never ease-in. src/design/feel.ts holds it. */
52 --ease: cubic-bezier(.23, 1, .32, 1);
53 --ease-move: cubic-bezier(.77, 0, .175, 1);
54 /* One motion vocabulary: the code viewer's timings, named. A press is
55 --dur-1, a hover, a tooltip or a popover --dur-2, a thing arriving
56 --dur-3, all under 300 ms; a pixel figure changes frame every --beat (#10570). */
5457 --dur-1: 100ms;
5558 --dur-2: 140ms;
5659 --dur-3: 200ms;
@@ -78,8 +81,8 @@ body {
7881 text-rendering: optimizeLegibility;
7982 }
8083
81 a { color: inherit; text-decoration: none; transition: color 120ms var(--ease); }
82 a:hover { color: var(--accent); }
84 a { color: inherit; text-decoration: none; }
85 @media (hover: hover) and (pointer: fine) { a:hover { color: var(--accent); } }
8386 code, pre, .mono { font-family: var(--mono); font-size: 12.5px; }
8487 .mono { overflow-wrap: anywhere; }
8588
@@ -105,7 +108,7 @@ h3 { font-size: 14px; font-weight: 600; line-height: 1.4; }
105108 position: absolute; left: 16px; top: -48px; z-index: 40;
106109 padding: 8px 14px; border-radius: var(--radius);
107110 background: var(--primary); color: var(--primary-fg);
108 font-weight: 500; transition: top 140ms var(--ease);
111 font-weight: 500;
109112 }
110113 .skip:focus-visible { top: 10px; color: var(--primary-fg); }
111114
@@ -140,8 +143,8 @@ h3 { font-size: 14px; font-weight: 600; line-height: 1.4; }
140143 background: linear-gradient(135deg, var(--accent), var(--merged));
141144 transition: transform 200ms var(--ease);
142145 }
143 .wordmark:hover { color: var(--fg); }
144 .wordmark:hover .mark { transform: rotate(135deg); }
146 @media (hover: hover) and (pointer: fine) { .wordmark:hover { color: var(--fg); }
147 .wordmark:hover .mark { transform: rotate(135deg); } }
145148 .topbar .spacer { flex: 1; }
146149 .topbar-tools { display: flex; align-items: center; gap: 6px; flex: 0 1 auto; min-width: 0; }
147150 .topbar-tools > a.small { display: inline-flex; align-items: center; min-height: 44px; padding: 0 8px; flex: none; }
@@ -166,7 +169,7 @@ body { overflow-x: clip; }
166169 width: 7px; height: 7px; border-radius: 2px; opacity: .7;
167170 background: linear-gradient(135deg, var(--accent), var(--merged));
168171 }
169 .foot a:hover { color: var(--accent); }
172 @media (hover: hover) and (pointer: fine) { .foot a:hover { color: var(--accent); } }
170173 .foot .reduced { color: var(--muted-fg); }
171174
172175 @media (prefers-reduced-motion: reduce) {
@@ -174,7 +177,7 @@ body { overflow-x: clip; }
174177 *, *::before, *::after {
175178 animation-duration: .01ms !important;
176179 animation-iteration-count: 1 !important;
177 transition-duration: .01ms !important;
180 transition-property: opacity !important;
178181 }
179182 }
180183
src/web/style/components.ts +57 −51
@@ -29,36 +29,35 @@ export const components = /* css */ `
2929 background: var(--card); color: var(--fg);
3030 font-weight: 500; font-size: 14px; white-space: nowrap; cursor: pointer;
3131 box-shadow: var(--shadow-1);
32 transition: background-color 140ms var(--ease), border-color 140ms var(--ease),
33 color 140ms var(--ease), opacity 140ms var(--ease);
32 transition: opacity 140ms var(--ease), transform var(--dur-1) var(--ease);
3433 }
35 .btn:hover { background: var(--muted); border-color: var(--border-strong); color: var(--fg); }
36 .btn:active { opacity: .85; }
34 @media (hover: hover) and (pointer: fine) { .btn:hover { background: var(--muted); border-color: var(--border-strong); color: var(--fg); } }
35 .btn:active { opacity: .85; transform: scale(.97); }
3736 .btn[disabled], .btn[aria-disabled="true"] { opacity: .5; pointer-events: none; }
3837 .btn[aria-busy="true"] { opacity: .7; pointer-events: none; }
3938 .btn[data-variant="primary"] {
4039 background: var(--primary); color: var(--primary-fg); border-color: var(--primary);
4140 }
42 .btn[data-variant="primary"]:hover { opacity: .88; background: var(--primary); color: var(--primary-fg); }
41 @media (hover: hover) and (pointer: fine) { .btn[data-variant="primary"]:hover { opacity: .88; background: var(--primary); color: var(--primary-fg); } }
4342 .btn[data-variant="secondary"] { background: var(--muted); border-color: transparent; box-shadow: none; }
44 .btn[data-variant="secondary"]:hover { border-color: var(--border); }
43 @media (hover: hover) and (pointer: fine) { .btn[data-variant="secondary"]:hover { border-color: var(--border); } }
4544 .btn[data-variant="outline"] { background: transparent; box-shadow: none; }
4645 .btn[data-variant="ghost"] { background: transparent; border-color: transparent; box-shadow: none; color: var(--muted-fg); }
47 .btn[data-variant="ghost"]:hover { background: var(--muted); color: var(--fg); border-color: transparent; }
46 @media (hover: hover) and (pointer: fine) { .btn[data-variant="ghost"]:hover { background: var(--muted); color: var(--fg); border-color: transparent; } }
4847 /* A toggle shows its state: the chip, the sort button. */
4948 .btn[aria-pressed="true"] { background: var(--muted); border-color: var(--border-strong); color: var(--fg); font-weight: 550; }
5049 .btn[aria-pressed="false"] { color: var(--muted-fg); }
5150 .btn[data-variant="danger"] { color: var(--danger); }
52 .btn[data-variant="danger"]:hover {
51 @media (hover: hover) and (pointer: fine) { .btn[data-variant="danger"]:hover {
5352 border-color: color-mix(in srgb, var(--danger) 45%, var(--border));
5453 background: color-mix(in srgb, var(--danger) 8%, var(--card));
5554 color: var(--danger);
56 }
55 } }
5756 .btn[data-variant="link"] {
5857 border-color: transparent; background: none; box-shadow: none;
5958 color: var(--accent); padding: 0; min-height: 0;
6059 }
61 .btn[data-variant="link"]:hover { background: none; text-decoration: underline; text-underline-offset: 3px; }
60 @media (hover: hover) and (pointer: fine) { .btn[data-variant="link"]:hover { background: none; text-decoration: underline; text-underline-offset: 3px; } }
6261 .btn[data-size="sm"] { min-height: 28px; padding: 0 10px; font-size: 13px; gap: 5px; }
6362 .btn[data-size="lg"] { min-height: 44px; padding: 0 18px; font-size: 15px; }
6463 /* An icon button is a square of its size class — 36px matches the button min-height, so a row of mixed buttons has one silhouette. */
@@ -77,10 +76,9 @@ export const components = /* css */ `
7776 width: 100%; min-height: 36px; padding: 7px 10px;
7877 border: 1px solid var(--border); border-radius: var(--radius-sm);
7978 background: var(--card); color: var(--fg);
80 transition: border-color 140ms var(--ease), box-shadow 140ms var(--ease);
8179 }
8280 .input.input-num { width: 5rem; }
83 .input:hover { border-color: var(--border-strong); }
81 @media (hover: hover) and (pointer: fine) { .input:hover { border-color: var(--border-strong); } }
8482 .input:focus-visible {
8583 outline: none; border-color: var(--accent);
8684 box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent);
@@ -147,7 +145,8 @@ select.input {
147145 background: var(--card); color: var(--muted-fg);
148146 }
149147 .why > summary::-webkit-details-marker { display: none; }
150 .why > summary:hover, .why[open] > summary { border-color: var(--border-strong); color: var(--fg); }
148 .why[open] > summary { border-color: var(--border-strong); color: var(--fg); }
149 @media (hover: hover) and (pointer: fine) { .why > summary:hover { border-color: var(--border-strong); color: var(--fg); } }
151150 .why > summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
152151 .why > p { margin: 6px 0 0; font-size: 12.5px; color: var(--muted-fg); overflow-wrap: anywhere; }
153152 @media (pointer: coarse) { .why > summary { width: 44px; height: 44px; } }
@@ -177,7 +176,7 @@ fieldset.field > .check + .check { margin-top: 8px; }
177176 overflow: hidden; border: 1px solid var(--border); border-radius: var(--radius);
178177 background: var(--card); color: var(--fg); text-decoration: none;
179178 }
180 a.stat:hover { border-color: var(--border-strong); }
179 @media (hover: hover) and (pointer: fine) { a.stat:hover { border-color: var(--border-strong); } }
181180 .stat[data-tone="attn"] { border-color: color-mix(in srgb, var(--attn) 40%, var(--border)); }
182181 .stat-label { display: block; height: 18px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: var(--fs-min); line-height: 18px; color: var(--muted-fg); }
183182 .stat-value { display: block; height: 32px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: 20px; font-weight: 600; line-height: 32px; }
@@ -262,7 +261,7 @@ a.stat:hover { border-color: var(--border-strong); }
262261 border: 1px solid color-mix(in srgb, var(--label) 32%, transparent);
263262 white-space: nowrap;
264263 }
265 a.label:hover { color: color-mix(in srgb, var(--label) 90%, var(--fg)); }
264 @media (hover: hover) and (pointer: fine) { a.label:hover { color: color-mix(in srgb, var(--label) 90%, var(--fg)); } }
266265
267266 .pill {
268267 display: inline-flex; align-items: center; justify-content: center;
@@ -366,7 +365,7 @@ kbd {
366365 border-radius: 4px; background: var(--muted); color: var(--muted-fg);
367366 font-variant-numeric: tabular-nums;
368367 }
369 a.sha:hover { color: var(--accent); }
368 @media (hover: hover) and (pointer: fine) { a.sha:hover { color: var(--accent); } }
370369
371370 /* ---- avatar ----
372371 The hue is the person's (data-h, twelve of them), so the twelve are spelled
@@ -403,7 +402,7 @@ a.sha:hover { color: var(--accent); }
403402 .avatar[data-size="lg"] { width: 56px; height: 56px; font-size: 20px; border-radius: var(--radius-lg); }
404403
405404 .byline { display: inline-flex; align-items: center; gap: 5px; min-width: 0; }
406 .byline a:hover { color: var(--accent); }
405 @media (hover: hover) and (pointer: fine) { .byline a:hover { color: var(--accent); } }
407406 .name-mark {
408407 display: inline-block; padding: 0 5px; border-radius: 4px;
409408 font-size: var(--fs-min); font-weight: 600; line-height: 15px; letter-spacing: 0.04em;
@@ -502,17 +501,16 @@ a.sha:hover { color: var(--accent); }
502501 .row {
503502 display: flex; align-items: center; gap: 10px;
504503 padding: 8px 14px; min-height: 40px;
505 transition: background-color 100ms var(--ease);
506504 }
507505 a.flow-row { min-height: 44px; }
508506 .row:focus-visible { outline-offset: -2px; }
509 a.row:hover, .row[data-nav]:hover { background: var(--muted); color: inherit; }
507 @media (hover: hover) and (pointer: fine) { a.row:hover, .row[data-nav]:hover { background: var(--muted); color: inherit; } }
510508 .list li[aria-current="true"] > .row { background: var(--muted); }
511509 /* A tree: the rows under a row hang from a rule, a step in. */
512510 .list li[data-mine] > .row, .list li[data-mine]:target > .row { background: var(--muted); }
513511 .row-children { list-style: none; margin: 0 0 0 22px; padding: 0; border-left: 1px solid var(--border); }
514512 .row-children > li[data-fold] > details > summary { display: flex; align-items: center; min-height: 44px; padding: 0 12px; cursor: pointer; color: var(--muted-fg, inherit); }
515 .row-children > li[data-fold] > details > summary:hover { background: var(--muted); }
513 @media (hover: hover) and (pointer: fine) { .row-children > li[data-fold] > details > summary:hover { background: var(--muted); } }
516514 .row-children > li[data-fold] > details > summary:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
517515 .row-children > li { border-top: 1px solid var(--border); }
518516 @media (max-width: 719px) { .row-children { margin-left: 12px; } }
@@ -532,17 +530,16 @@ li[data-severed] .row-lead, li[data-severed] .row-title { opacity: .6; }
532530 [data-look] .looks { flex-wrap: nowrap; gap: 10px; align-items: center; }
533531 [data-look] a.look { position: relative; overflow: visible; }
534532 [data-look] a.look::after { content: ""; position: absolute; inset: -7px; }
535 a.row:hover .row-title { color: var(--accent); }
533 @media (hover: hover) and (pointer: fine) { a.row:hover .row-title { color: var(--accent); } }
536534 /* The docs index (/docs): a link per document, 44px to hit, then one muted line on what it is
537535 for, as bare text after the link so the index stays under 15 KB. */
538536 .docs-index > li { padding: 0 16px 12px; color: var(--muted-fg); font-size: 14px; }
539 .docs-index > li > a { display: block; margin: 0 -16px; padding: 12px 16px 2px; color: var(--fg); font-size: 1rem; transition: background-color 100ms var(--ease); }
540 .docs-index > li > a:hover { background: var(--muted); color: var(--accent); }
537 .docs-index > li > a { display: block; margin: 0 -16px; padding: 12px 16px 2px; color: var(--fg); font-size: 1rem; }
538 @media (hover: hover) and (pointer: fine) { .docs-index > li > a:hover { background: var(--muted); color: var(--accent); } }
541539 .docs-index > li > a:focus-visible { outline-offset: -2px; }
542540 .row-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
543541 .row-title {
544542 font-weight: 550; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
545 transition: color 100ms var(--ease);
546543 }
547544 /* One honest line: everything in it is inline, so text-overflow actually
548545 has a block box to ellipsize (a flex container would silently ignore it)
@@ -606,7 +603,7 @@ span.ex-pic { display: inline-flex; align-items: center; justify-content: center
606603 .row[data-state="draft"] .row-lead { color: var(--muted-fg); }
607604 /* A row that folds is a <summary>: its lead is the caret, turned when open. */
608605 summary.row { cursor: pointer; list-style: none; }
609 summary.row:hover { background: var(--muted); }
606 @media (hover: hover) and (pointer: fine) { summary.row:hover { background: var(--muted); } }
610607 details[open] > summary.row > .row-lead { transform: rotate(90deg); }
611608 /* A report's open body: block children in reading order, never one flex line. */
612609 .report-body { padding: 0 14px 14px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; min-width: 0; overflow-wrap: anywhere; }
@@ -621,7 +618,8 @@ details[open] > summary.row > .row-lead { transform: rotate(90deg); }
621618 .counts { display: inline-flex; align-items: center; gap: 10px; flex: none; }
622619 /* Secondary actions are always in the DOM, revealed without layout shift. */
623620 .row-actions { opacity: 0; transition: opacity 120ms var(--ease); }
624 .row:hover .row-actions, .row:focus-within .row-actions { opacity: 1; }
621 .row:focus-within .row-actions { opacity: 1; }
622 @media (hover: hover) and (pointer: fine) { .row:hover .row-actions { opacity: 1; } }
625623 /* Settings controls are the point of their row, never revealed by hover:
626624 they wrap under the text before they would clip, at any width. */
627625 .row-fields { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
@@ -647,7 +645,7 @@ details[open] > summary.row > .row-lead { transform: rotate(90deg); }
647645 .edit-row > .input { flex: 1 1 160px; width: auto; min-width: 0; }
648646 .edit-row .btn { flex: none; }
649647 .label-open { color: var(--muted-fg); font-size: 13px; text-decoration: underline; text-underline-offset: 2px; }
650 .label-open:hover { color: var(--fg); }
648 @media (hover: hover) and (pointer: fine) { .label-open:hover { color: var(--fg); } }
651649 /* A swatch and its hex, as one control-shaped thing. */
652650 .color-field {
653651 display: inline-flex; align-items: center; gap: 8px; flex: none;
@@ -721,9 +719,8 @@ details[open] > summary.row > .row-lead { transform: rotate(90deg); }
721719 scroll-snap-align: start;
722720 color: var(--muted-fg); font-size: 14px;
723721 border-radius: var(--radius-sm) var(--radius-sm) 0 0;
724 transition: color 120ms var(--ease), background-color 120ms var(--ease);
725722 }
726 .tabs > a:hover { color: var(--fg); background: var(--muted); }
723 @media (hover: hover) and (pointer: fine) { .tabs > a:hover { color: var(--fg); background: var(--muted); } }
727724 .tabs > a[aria-current="page"] { color: var(--fg); font-weight: 550; }
728725 .tabs > a[aria-current="page"]::after {
729726 content: ""; position: absolute; left: 8px; right: 8px; bottom: -1px;
@@ -745,10 +742,9 @@ details[open] > summary.row > .row-lead { transform: rotate(90deg); }
745742 min-height: 28px; padding: 0 10px; border-radius: var(--radius-sm);
746743 font-size: 13px; font-weight: 500; color: var(--muted-fg);
747744 white-space: nowrap; cursor: pointer; margin: 0;
748 transition: background-color 120ms var(--ease), color 120ms var(--ease);
749745 }
750746 .seg > button { border: 0; background: none; }
751 .seg > a:hover, .seg > label:hover, .seg > button:hover { color: var(--fg); }
747 @media (hover: hover) and (pointer: fine) { .seg > a:hover, .seg > label:hover, .seg > button:hover { color: var(--fg); } }
752748 .seg > label input { position: absolute; opacity: 0; pointer-events: none; }
753749 .seg > a[aria-current="page"], .seg > label:has(input:checked), .seg > button[aria-pressed="true"] {
754750 background: var(--card); color: var(--fg); box-shadow: var(--shadow-1);
@@ -772,10 +768,13 @@ details[open] > summary.row > .row-lead { transform: rotate(90deg); }
772768 min-width: 220px; max-width: min(320px, calc(100vw - 32px)); padding: 5px;
773769 background: var(--card); border: 1px solid var(--border);
774770 border-radius: var(--radius-lg); box-shadow: var(--shadow-2);
775 animation: pop 140ms var(--ease) both;
771 transform-origin: top right; transition: opacity var(--dur-2) var(--ease), transform var(--dur-2) var(--ease);
776772 max-height: min(70vh, 480px); overflow-y: auto; scrollbar-width: none;
777773 }
778 .menu[data-align="start"] > .menu-panel { right: auto; left: 0; }
774 .menu[data-align="start"] > .menu-panel { right: auto; left: 0; transform-origin: top left; }
775 /* An enter is a transition from @starting-style, so it can be cut short; where @starting-style is
776 unknown the panel simply appears whole. It grows from its trigger's corner, never from nothing. */
777 @starting-style { .menu[open] > .menu-panel { opacity: 0; transform: scale(.95); } }
779778 @keyframes pop { from { opacity: 0; transform: translateY(-4px); } }
780779 .menu-title {
781780 display: block; padding: 6px 10px 4px;
@@ -787,12 +786,12 @@ details[open] > summary.row > .row-lead { transform: rotate(90deg); }
787786 padding: 7px 10px; border: 0; border-radius: var(--radius-sm);
788787 background: none; color: var(--fg); font-size: 14px;
789788 text-align: left; cursor: pointer;
790 transition: background-color 100ms var(--ease);
791789 }
792 .menu-item:hover, .menu-item:focus-visible { background: var(--muted); color: var(--fg); }
790 .menu-item:focus-visible { background: var(--muted); color: var(--fg); }
791 @media (hover: hover) and (pointer: fine) { .menu-item:hover { background: var(--muted); color: var(--fg); } }
793792 .menu-item[aria-current="true"] { font-weight: 550; }
794793 .menu-item[aria-disabled="true"] { cursor: not-allowed; opacity: .65; }
795 .menu-item[aria-disabled="true"]:hover { background: none; }
794 @media (hover: hover) and (pointer: fine) { .menu-item[aria-disabled="true"]:hover { background: none; } }
796795 .menu-item small { display: block; }
797796 .menu-item[aria-disabled="true"] .grow { white-space: normal; }
798797 :is(.menu-item, .menu-row) .ico { color: var(--faint); }
@@ -816,11 +815,11 @@ details[open] > summary.row > .row-lead { transform: rotate(90deg); }
816815 inset: auto 0 calc(100% - 100dvh); max-width: none; max-height: 80dvh;
817816 padding: 8px 8px max(8px, env(safe-area-inset-bottom));
818817 border-width: 1px 0 0; border-radius: var(--radius-lg) var(--radius-lg) 0 0;
819 animation: rise 200ms var(--ease) both;
818 transition: transform var(--dur-3) var(--ease);
820819 }
820 @starting-style { .topbar .menu[open] > .menu-panel { transform: translateY(100%); } }
821821 .topbar :is(.menu-item, .menu-row) { min-height: 44px; font-size: 16px; }
822822 }
823 @keyframes rise { from { transform: translateY(100%); } }
824823 /* No anchor positioning: browsers that accept anchor-name but not
825824 position-area would keep position: fixed and park the panel at the
826825 viewport's corner. Absolute-inside-the-details works everywhere. */
@@ -836,7 +835,7 @@ details[open] > summary.row > .row-lead { transform: rotate(90deg); }
836835 transition: transform 120ms var(--ease);
837836 }
838837 .disclosure[open] > summary::before { transform: rotate(90deg); }
839 .disclosure > summary:hover { color: var(--accent); }
838 @media (hover: hover) and (pointer: fine) { .disclosure > summary:hover { color: var(--accent); } }
840839 .disclosure > summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: var(--radius); }
841840 /* A page's "? Help" (page_help.ts): a 44px target a thumb can hit, and a ring a keyboard can see. */
842841 .disclosure[data-page-help] > summary { width: fit-content; min-width: 44px; }
@@ -850,7 +849,6 @@ details[open] > summary.row > .row-lead { transform: rotate(90deg); }
850849 padding: 0 8px; min-height: 32px;
851850 border: 1px solid var(--border); border-radius: var(--radius-sm);
852851 background: var(--card); color: var(--muted-fg);
853 transition: border-color 140ms var(--ease);
854852 }
855853 .topbar-search:focus-within { border-color: var(--accent); }
856854 .topbar-search input {
@@ -878,7 +876,11 @@ details[open] > summary.row > .row-lead { transform: rotate(90deg); }
878876 .dialog::backdrop { background: color-mix(in srgb, var(--bg) 62%, #0008); backdrop-filter: blur(3px); }
879877 /* The one open-state rule (#11831): an overlay is laid out only while open, and every overlay
880878 (dialog, palette) gets its layout here; a component adds only what is its own. */
881 .dialog[open] { display: flex; flex-direction: column; animation: pop 140ms var(--ease) both; }
879 .dialog[open] { display: flex; flex-direction: column; transition: opacity var(--dur-2) var(--ease), transform var(--dur-2) var(--ease); }
880 /* A modal stays centred: it fades and settles from .95 in place. The palette opens from the keyboard
881 many times a day, so it has no motion at all. */
882 @starting-style { .dialog[open] { opacity: 0; transform: scale(.95); } }
883 .dialog.palette { transition: none; }
882884 .dialog-head { display: flex; align-items: center; gap: 8px; padding: 14px 16px 0; }
883885 .dialog-head h2 { flex: 1; }
884886 .dialog-body { padding: 12px 16px; }
@@ -939,7 +941,8 @@ html[data-overlay] { overflow: hidden; }
939941 }
940942 /* One highlight. The pointer moves it (the script listens) rather than
941943 painting a second one under the cursor; the finder keeps plain hover. */
942 .palette-item[aria-selected="true"], .finder .palette-item:hover { background: var(--muted); }
944 .palette-item[aria-selected="true"] { background: var(--muted); }
945 @media (hover: hover) and (pointer: fine) { .finder .palette-item:hover { background: var(--muted); } }
943946 /* --muted-fg is 4.40:1 on that highlight in light; the detail takes --fg there. */
944947 .palette-item[aria-selected="true"] .cat { color: var(--fg); }
945948 .palette-foot {
@@ -1040,7 +1043,8 @@ a[data-palette] { display: none; }
10401043 opacity: 0; pointer-events: none; transition: opacity 120ms var(--ease);
10411044 }
10421045 [data-tip][data-tip-side="bottom"]::after { bottom: auto; top: calc(100% + 6px); }
1043 [data-tip]:hover::after, [data-tip]:focus-visible::after { opacity: 1; }
1046 [data-tip]:focus-visible::after { opacity: 1; }
1047 @media (hover: hover) and (pointer: fine) { [data-tip]:hover::after { opacity: 1; } }
10441048 @media (pointer: coarse) { [data-tip]::after { display: none; } }
10451049
10461050 /* ---- page head: title, actions, subtitle ---- */
@@ -1145,7 +1149,7 @@ a[data-palette] { display: none; }
11451149 .bd-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 16px; }
11461150 .bd-head h2 { margin: 0; font-size: 16px; }
11471151 .bd-head a { display: inline-flex; align-items: center; min-height: 44px; font-size: 13px; color: var(--muted-fg); }
1148 .bd-head a:hover { color: var(--accent); }
1152 @media (hover: hover) and (pointer: fine) { .bd-head a:hover { color: var(--accent); } }
11491153 .bd-sub { flex: 1 1 320px; margin: 0; font-size: 13px; color: var(--muted-fg); }
11501154 .bd-ask .field { flex: 1 1 240px; max-width: 480px; }
11511155 .bd-ask { align-items: flex-end; }
@@ -1170,7 +1174,7 @@ a[data-palette] { display: none; }
11701174 .fold > summary { flex-wrap: wrap; align-items: baseline; gap: 0 12px; padding: 12px 0; }
11711175 .fold-title { margin: 0; font-size: 14px; font-weight: 600; color: var(--fg); }
11721176 .fold-state { flex: 1 1 200px; font-size: 13px; font-weight: 400; color: var(--muted-fg); }
1173 .fold > summary:hover .fold-title { color: var(--accent); }
1177 @media (hover: hover) and (pointer: fine) { .fold > summary:hover .fold-title { color: var(--accent); } }
11741178 .fold-body { display: flex; flex-direction: column; gap: 8px; padding: 0 0 16px 16px; font-size: 14px; }
11751179 .fold-body > p { margin: 0; }
11761180 .held-n { display: inline-block; margin-right: 12px; white-space: nowrap; }
@@ -1185,7 +1189,7 @@ a[data-palette] { display: none; }
11851189 .bp-body { min-width: 0; padding-top: 8px; }
11861190 .bp-foot { margin: auto 0 0; gap: 16px; font-size: var(--fs-min); color: var(--muted-fg); }
11871191 .bp-foot > a { display: inline-flex; align-items: center; min-height: 44px; }
1188 .bp-foot > a:hover { color: var(--accent); }
1192 @media (hover: hover) and (pointer: fine) { .bp-foot > a:hover { color: var(--accent); } }
11891193 .bp-w2 { flex: 2 1 calc(66.667% - 4px); }
11901194 .bp-w3 { flex: 1 1 100%; }
11911195 @media (min-width: 720px) {
@@ -1223,7 +1227,7 @@ a[data-palette] { display: none; }
12231227 display: flex; align-items: center; min-height: 28px; padding: 0 8px;
12241228 font-size: 13px; color: var(--muted-fg); border-radius: var(--radius-sm);
12251229 }
1226 .settings-nav a:hover, .settings-jump-list a:hover { background: var(--muted); color: var(--fg); }
1230 @media (hover: hover) and (pointer: fine) { .settings-nav a:hover, .settings-jump-list a:hover { background: var(--muted); color: var(--fg); } }
12271231 .settings-nav a[aria-current="page"], .settings-jump-list a[aria-current="page"] { color: var(--fg); font-weight: 550; background: var(--muted); }
12281232 .settings-nav a[hidden], .settings-group[hidden] { display: none; }
12291233 .settings-group { display: flex; flex-direction: column; gap: 1px; }
@@ -1299,7 +1303,7 @@ a[data-palette] { display: none; }
12991303 display: inline-flex; align-items: center; min-height: 28px; padding: 0 12px;
13001304 font: inherit; font-size: 13px; color: var(--muted-fg); background: transparent; border: 0; border-radius: var(--radius-sm); cursor: pointer;
13011305 }
1302 .segmented button:hover { color: var(--fg); }
1306 @media (hover: hover) and (pointer: fine) { .segmented button:hover { color: var(--fg); } }
13031307 .segmented-on { color: var(--fg); font-weight: 550; background: var(--card); box-shadow: var(--shadow-1); cursor: default; }
13041308
13051309 .setting-table td { vertical-align: middle; }
@@ -1366,14 +1370,16 @@ ul.list { overflow-anchor: none; }
13661370
13671371 /* Asked for less motion, the page keeps every state and loses the movement.
13681372 \`!important\` because a bare \`*\` has no specificity: every class rule above
1369 that sets an animation or transition would win. Durations collapse rather
1373 that sets an animation or transition would win. Animations collapse rather
13701374 than \`animation: none\`, so \`animationend\` still fires (src/web/live.ts
1371 removes its flash class on it). A busy loader stops turning and dims. */
1375 removes its flash class on it); a transition keeps only its fade, so what
1376 would travel arrives in place and what fades still fades. A busy loader
1377 stops turning and dims. */
13721378 @media (prefers-reduced-motion: reduce) {
13731379 *, *::before, *::after {
13741380 animation-duration: .01ms !important;
13751381 animation-iteration-count: 1 !important;
1376 transition-duration: .01ms !important;
1382 transition-property: opacity !important;
13771383 }
13781384 .btn[aria-busy="true"] .ico-loader { opacity: .6; }
13791385 }
src/web/style/content.ts +32 −24
@@ -52,9 +52,9 @@ a[data-waves-link] { display: inline-flex; align-items: center; min-height: 44px
5252 white-space: nowrap; cursor: default;
5353 }
5454 a.where-place, button.where-place { cursor: pointer; }
55 a.where-place:hover, button.where-place:hover {
55 @media (hover: hover) and (pointer: fine) { a.where-place:hover, button.where-place:hover {
5656 border-color: var(--border); background: var(--muted); color: var(--fg);
57 }
57 } }
5858 .where-place .ico { color: var(--faint); flex: none; }
5959 /* The dot is the place's aria-hidden span: ● ○ ◆ are decoration, and the
6060 state and the word beside them already say what they mean. */
@@ -74,14 +74,15 @@ a.where-place:hover, button.where-place:hover {
7474 .row-meta .where-place .ico { display: none; }
7575 .row-meta .where-place > span[aria-hidden="true"] { margin-right: 3px; }
7676 .row-title a { color: inherit; text-decoration: none; }
77 .row-title a:hover { color: var(--accent); }
77 @media (hover: hover) and (pointer: fine) { .row-title a:hover { color: var(--accent); } }
7878 /* The signed-in home (#9378). Its rows already clip one line and its
7979 sections are grid cells with min-width 0 (feed_style.ts); what is left is a
8080 long app name, which wraps inside its chip, and the tell box's input and
8181 select, which may shrink. The chip row is server-rendered, so a wrapped
8282 chip is its final height on first paint. */
8383 .home-doors a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; display: inline-flex; align-items: center; min-height: 44px; padding: 0 6px; box-sizing: border-box; }
84 .home-doors a:hover, .home-doors a:focus-visible { text-decoration-thickness: 2px; }
84 .home-doors a:focus-visible { text-decoration-thickness: 2px; }
85 @media (hover: hover) and (pointer: fine) { .home-doors a:hover { text-decoration-thickness: 2px; } }
8586 .home-doors { display: flex; flex-wrap: wrap; gap: 4px 12px; }
8687 .step-body { padding: 4px 16px 16px 44px; }
8788 .step-body > :first-child { margin-top: 0; }
@@ -125,7 +126,7 @@ a.where-place:hover, button.where-place:hover {
125126 background: var(--muted); color: var(--muted-fg);
126127 font-size: 12.5px; text-decoration: none;
127128 }
128 a.origin-chip:hover { border-color: var(--border-strong); color: var(--fg); }
129 @media (hover: hover) and (pointer: fine) { a.origin-chip:hover { border-color: var(--border-strong); color: var(--fg); } }
129130 .origin-chip .ico { color: var(--faint); flex: none; }
130131 /* An imported author is the origin's login, so it wears the origin's mark
131132 where a local avatar would be. */
@@ -227,7 +228,8 @@ a.origin-chip:hover { border-color: var(--border-strong); color: var(--fg); }
227228 .chart-line { fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linejoin: round; stroke-linecap: round; vector-effect: non-scaling-stroke; }
228229 .chart-wash { fill: currentColor; fill-opacity: 0.08; }
229230 .chart-hit { fill: currentColor; fill-opacity: 0; }
230 .chart-hit:hover, .chart a:focus-visible > .chart-hit { fill-opacity: 0.14; }
231 .chart a:focus-visible > .chart-hit { fill-opacity: 0.14; }
232 @media (hover: hover) and (pointer: fine) { .chart-hit:hover { fill-opacity: 0.14; } }
231233 /* A release, roll or config change: a dashed vertical mark; the synced crosshair is solid. */
232234 .chart-mark-hit { stroke: transparent; stroke-width: 8; vector-effect: non-scaling-stroke; pointer-events: stroke; }
233235 .chart-mark { pointer-events: none; stroke: var(--muted-fg); stroke-width: 1; stroke-dasharray: 3 3; vector-effect: non-scaling-stroke; }
@@ -236,9 +238,11 @@ a.origin-chip:hover { border-color: var(--border-strong); color: var(--fg); }
236238 .chart-tip > div > div { display: flex; justify-content: space-between; gap: 16px; }
237239 .chart-tip > div > div > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted-fg); }
238240 .chart .bar, .chart .cell { fill: currentColor; }
239 .chart .bar:hover, .chart a:focus-visible > .bar { fill-opacity: 0.7; }
241 .chart a:focus-visible > .bar { fill-opacity: 0.7; }
242 @media (hover: hover) and (pointer: fine) { .chart .bar:hover { fill-opacity: 0.7; } }
240243 .chart .cell { stroke: var(--card); stroke-width: 1; vector-effect: non-scaling-stroke; }
241 .chart .cell:hover, .chart a:focus-visible > .cell { stroke: var(--fg); }
244 .chart a:focus-visible > .cell { stroke: var(--fg); }
245 @media (hover: hover) and (pointer: fine) { .chart .cell:hover { stroke: var(--fg); } }
242246 .chart .area { fill-opacity: 0.85; }
243247 .chart a:focus-visible { outline: none; }
244248 .chart-x { grid-column: 2; display: flex; justify-content: space-between; height: 16px; }
@@ -261,7 +265,8 @@ a.origin-chip:hover { border-color: var(--border-strong); color: var(--fg); }
261265 .bp-h3 .chart-box { --chart-h: 536px; }
262266 /* A narrow chart keeps three of its five labels: the first, the middle and the last. */
263267 @container (max-width: 440px) { .chart-x:not(.is-slots) > span:nth-child(2):nth-last-child(4), .chart-x:not(.is-slots) > span:nth-child(4):nth-last-child(2) { display: none; } }
264 @media (forced-colors: active) { .chart-hit:hover, .chart a:focus-visible > .chart-hit { fill: Highlight; fill-opacity: 0.4; } }
268 @media (forced-colors: active) { .chart a:focus-visible > .chart-hit { fill: Highlight; fill-opacity: 0.4; }
269 @media (hover: hover) and (pointer: fine) { .chart-hit:hover { fill: Highlight; fill-opacity: 0.4; } } }
265270 #summary { display: flex; flex-wrap: wrap; gap: 6px; }
266271 #summary .pill { max-width: 100%; white-space: normal; }
267272 /* The stacked bar chart's series colours, for its bars (fleet-graph.ts).
@@ -342,15 +347,15 @@ form.inline { display: inline; margin-left: auto; }
342347 .door-shelf > .card { min-width: 0; margin: 0; padding-top: 14px; border: 0; border-top: 1px solid var(--border-strong); border-radius: 0; background: transparent; box-shadow: none; overflow: visible; }
343348 .door-kick { margin: 0 0 14px; font-family: var(--mono); font-size: 12.5px; color: var(--muted-fg); }
344349 .door-kick span { color: var(--fg); }
345 .door-shelf .look { aspect-ratio: 16 / 9; transition: border-color 0.15s ease; }
346 .door-shelf .look:hover { border-color: var(--border-strong); }
350 .door-shelf .look { aspect-ratio: 16 / 9; }
351 @media (hover: hover) and (pointer: fine) { .door-shelf .look:hover { border-color: var(--border-strong); } }
347352 .door-shelf .look img { height: 100%; object-fit: cover; object-position: top; }
348353 .door-shelf .card-body { padding: 14px 0 0; gap: 4px; }
349354 .door-shelf .card-body strong { font-size: 16px; font-weight: 500; letter-spacing: -0.015em; overflow-wrap: anywhere; }
350355 .door-line { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; min-height: 3em; line-height: 1.5; }
351356 .door-verbs { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 10px 0 0; font-family: var(--mono); font-size: 12.5px; }
352357 .door-verbs a { min-height: 24px; color: var(--muted-fg); }
353 .door-verbs a:hover { color: var(--fg); }
358 @media (hover: hover) and (pointer: fine) { .door-verbs a:hover { color: var(--fg); } }
354359 .door-verbs .door-verb-first { color: var(--fg); font-weight: 600; text-decoration: underline; text-underline-offset: 4px; }
355360 .door-more { margin-top: 36px; }
356361 .door-steps { display: grid; gap: 32px; margin: 44px 0 0; padding: 0; list-style: none; counter-reset: door-step; }
@@ -364,7 +369,7 @@ form.inline { display: inline; margin-left: auto; }
364369 .door-pulse { margin: 72px 0 0; }
365370 .door-pulse svg { display: block; width: 100%; height: clamp(72px, 10vw, 120px); fill: var(--fg); }
366371 .door-pulse-quiet { fill: var(--border-strong); }
367 .door-pulse rect:hover { fill: var(--accent); }
372 @media (hover: hover) and (pointer: fine) { .door-pulse rect:hover { fill: var(--accent); } }
368373 .door-pulse figcaption { margin-top: 10px; }
369374 .door-org { margin-top: 64px; padding-top: 18px; border-top: 1px solid var(--border); color: var(--muted-fg); }
370375 .door-org a { color: var(--fg); }
@@ -487,9 +492,9 @@ form.inline { display: inline; margin-left: auto; }
487492 border-right: 1px solid var(--border);
488493 }
489494 .code .ln a { color: inherit; display: block; }
490 .code .ln a:hover { color: var(--accent); }
495 @media (hover: hover) and (pointer: fine) { .code .ln a:hover { color: var(--accent); } }
491496 .code pre { white-space: pre; line-height: 1.55; min-height: 1.55em; font-variant-ligatures: none; }
492 .code tr:hover { background: color-mix(in srgb, var(--muted) 55%, transparent); }
497 @media (hover: hover) and (pointer: fine) { .code tr:hover { background: color-mix(in srgb, var(--muted) 55%, transparent); } }
493498 .code tr:target, .code tr[data-hl] {
494499 background: color-mix(in srgb, var(--attn) 16%, transparent);
495500 }
@@ -698,9 +703,9 @@ img.img-box, .prose img.img-box, .tell-picture.img-box { display: block; width:
698703 .prose a {
699704 color: var(--accent); text-decoration: underline;
700705 text-decoration-color: color-mix(in srgb, var(--accent) 35%, transparent);
701 text-underline-offset: 3px; transition: text-decoration-color 140ms var(--ease);
706 text-underline-offset: 3px;
702707 }
703 .prose a:hover { text-decoration-color: currentColor; }
708 @media (hover: hover) and (pointer: fine) { .prose a:hover { text-decoration-color: currentColor; } }
704709 .prose img { border-radius: var(--radius-sm); }
705710 /* A markdown table is wide by nature: it keeps its own width (headers on one line, body cells wrap only past 32ch)
706711 and scrolls sideways inside its one frame, with momentum, never the page. The edge shadows are the old
@@ -816,7 +821,7 @@ img.img-box, .prose img.img-box, .tell-picture.img-box { display: block; width:
816821 .nonl { color: var(--del-fg); opacity: .7; padding-left: 8px; }
817822 .dl:target .dc, .dl[data-hl] .dc { box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--attn) 55%, transparent); }
818823 .dn-comment { color: var(--faint); display: inline-block; }
819 .dn-comment:hover { color: var(--accent-fg); background: var(--accent); border-radius: 4px; }
824 @media (hover: hover) and (pointer: fine) { .dn-comment:hover { color: var(--accent-fg); background: var(--accent); border-radius: 4px; } }
820825 .dl-bar td { padding: 4px 8px; background: var(--muted); }
821826 .dl-bar span { position: sticky; left: 8px; display: inline-flex; gap: 8px; font-family: var(--font); }
822827 /* review comments ride under their line, full width */
@@ -997,7 +1002,7 @@ img.img-box, .prose img.img-box, .tell-picture.img-box { display: block; width:
9971002 .ex-dir > summary > .ico { transition: transform 120ms var(--ease); }
9981003 .ex-dir[open] > summary > .ico { transform: rotate(90deg); }
9991004 .ex-dir > summary { font-weight: 500; color: var(--fg); }
1000 .ex-file:hover, .ex-dir > summary:hover, .ex-more:hover { background: var(--muted); color: var(--fg); }
1005 @media (hover: hover) and (pointer: fine) { .ex-file:hover, .ex-dir > summary:hover, .ex-more:hover { background: var(--muted); color: var(--fg); } }
10011006 .ex-file[aria-current="page"] {
10021007 background: color-mix(in srgb, var(--accent) 12%, transparent);
10031008 color: var(--fg); font-weight: 550;
@@ -1045,12 +1050,14 @@ img.img-box, .prose img.img-box, .tell-picture.img-box { display: block; width:
10451050 }
10461051 .code-layout > [data-split]::after {
10471052 content: ""; position: absolute; top: 0; bottom: 0; left: 50%;
1048 width: 1px; margin-left: -0.5px; background: var(--border);
1049 transition: background-color 120ms var(--ease), width 120ms var(--ease), margin-left 120ms var(--ease);
1053 width: 1px; translate: -50% 0; background: var(--border);
10501054 }
1051 .code-layout > [data-split]:hover::after, .code-layout > [data-split]:focus-visible::after, .code-layout[data-dragging] > [data-split]::after {
1052 width: 3px; margin-left: -1.5px; background: var(--accent);
1055 .code-layout > [data-split]:focus-visible::after, .code-layout[data-dragging] > [data-split]::after {
1056 width: 3px; background: var(--accent);
10531057 }
1058 @media (hover: hover) and (pointer: fine) { .code-layout > [data-split]:hover::after {
1059 width: 3px; background: var(--accent);
1060 } }
10541061 .code-layout > [data-split]:focus-visible { outline-offset: 0; }
10551062 /* While a drag is on, nothing beneath the pointer may select or steal
10561063 the cursor. */
@@ -1180,7 +1187,8 @@ textarea.editor:focus-visible { outline: none; }
11801187 .branch-row .row-meta { white-space: normal; overflow-wrap: anywhere; }
11811188 .branch-row .row-trail { flex: 0 1 auto; flex-wrap: wrap; gap: 4px 12px; }
11821189 .branch-row .branch-del { color: var(--muted-fg); }
1183 .branch-row .branch-del:hover, .branch-row .branch-del:focus-visible { color: var(--danger); }
1190 .branch-row .branch-del:focus-visible { color: var(--danger); }
1191 @media (hover: hover) and (pointer: fine) { .branch-row .branch-del:hover { color: var(--danger); } }
11841192 @media (max-width: 719px) {
11851193 .branch-row { flex-wrap: wrap; }
11861194 .branch-row .row-trail { flex: 1 1 100%; justify-content: flex-start; }
src/web/talk_parts.ts +1 −1
@@ -453,7 +453,7 @@ export const widgetCss = /* css */ `
453453 .wchart stop { stop-color: var(--c); }
454454 .wchart :is(rect, path):not(.wchart-line, .wchart-fill, .wchart-hit) { fill: var(--c); stroke: var(--card); stroke-width: 1; vector-effect: non-scaling-stroke; }
455455 .wchart-hit { fill: var(--fg); fill-opacity: 0; }
456 .wchart-hit:hover { fill-opacity: .05; }
456 @media (hover: hover) and (pointer: fine) { .wchart-hit:hover { fill-opacity: .05; } }
457457 .wchart-tick { position: absolute; left: 0; width: 28px; text-align: right; top: 0; transform: translateY(-50%); }
458458 .wchart-tick.is-zero { top: 100%; }
459459 .wchart-x { display: flex; justify-content: space-between; margin: 6px 12px 0 32px; }
test/components-reduced-motion.test.ts +2 −2
@@ -3,9 +3,9 @@ import { components } from "../src/web/style/components";
33
44 const block = components.match(/@media \(prefers-reduced-motion: reduce\) \{([\s\S]*?)\n\}\n/)?.[1] ?? "";
55
6 test("reduced motion collapses every animation and transition, and wins over class rules", () => {
6 test("reduced motion collapses every animation, keeps a transition's fade and drops its travel, and wins over class rules", () => {
77 expect(block).toContain("*, *::before, *::after");
8 for (const d of ["animation-duration: .01ms", "animation-iteration-count: 1", "transition-duration: .01ms"]) {
8 for (const d of ["animation-duration: .01ms", "animation-iteration-count: 1", "transition-property: opacity"]) {
99 expect(block).toContain(`${d} !important;`);
1010 }
1111 });
test/design-lint-feel.test.ts added +73
@@ -0,0 +1,73 @@
1 /**
2 * How motion feels (`src/design/feel.ts`): the design lint refuses ease-in, UI motion over 300 ms,
3 * a scale from 0, a transition of anything but transform and opacity, and a hover outside the
4 * hover media query; the tree has none but what docs/design/feel-allow.json names, each with its
5 * reason, and no allowance outlives its finding. An enter from @starting-style never decides the
6 * end state: where the browser does not know the at-rule, the element simply appears whole.
7 */
8 import { expect, test } from "bun:test";
9 import { readFileSync } from "node:fs";
10 import { FEEL_ALLOW, feelIn, scanFeel, staleAllows, type FeelAllow } from "../src/design/feel.ts";
11 import { sourceFiles, cssBlocksAt } from "../src/design/overlay.ts";
12
13 const sheet = (css: string): string => `export const x = /* css */ \`${css}\`;`;
14 const rules = (css: string): string[] => feelIn(sheet(css)).map((f) => f.rule);
15
16 test("each rule is seen, and what keeps to it is not", () => {
17 expect(rules(".a { transition: opacity 120ms ease-in; }")).toEqual(["easein"]);
18 expect(rules(".a { transition: opacity 120ms ease-in-out; }")).toEqual([]);
19 expect(rules(".a { transition: transform 400ms var(--ease); }")).toEqual(["slow"]);
20 expect(rules(".a { animation: pop 450ms var(--ease) both; }")).toEqual(["slow"]);
21 // A loop is an indicator, not a transition.
22 expect(rules(".a { animation: spin 1.1s linear infinite; }")).toEqual([]);
23 expect(rules(".a { transform: scale(0); }")).toEqual(["scale0"]);
24 expect(rules(".a { transform: scale(.95); }")).toEqual([]);
25 expect(rules(".a { transition: background-color 100ms var(--ease); }")).toEqual(["prop"]);
26 expect(rules(".a { transition: all 100ms var(--ease); }")).toEqual(["prop"]);
27 expect(rules(".a { transition: opacity 100ms var(--ease), transform var(--dur-1) var(--ease); }")).toEqual([]);
28 expect(rules(".a { transition-property: opacity !important; }")).toEqual([]);
29 expect(rules(".a:hover { color: red; }")).toEqual(["hover"]);
30 expect(rules("@media (hover: hover) and (pointer: fine) { .a:hover { color: red; } }")).toEqual([]);
31 expect(rules("@media (min-width: 900px) { @media (hover: hover) and (pointer: fine) { .a:hover { color: red; } } }")).toEqual([]);
32 expect(rules("@media (min-width: 900px) { .a:hover { color: red; } }")).toEqual(["hover"]);
33 });
34
35 test("the tree keeps every rule but its named exceptions, and each exception still has its finding and a reason", () => {
36 expect(scanFeel(".")).toEqual([]);
37 expect(staleAllows(".")).toEqual([]);
38 for (const a of JSON.parse(readFileSync(FEEL_ALLOW, "utf8")) as FeelAllow[]) expect(a.why.length, a.text).toBeGreaterThan(60);
39 });
40
41 test("an enter from @starting-style never decides the end state", () => {
42 let starts = 0;
43 for (const f of sourceFiles(".")) {
44 for (const { css } of cssBlocksAt(readFileSync(f, "utf8"))) {
45 for (const m of css.matchAll(/@starting-style\s*\{\s*([^{]+)\{([^}]*)\}\s*\}/g)) {
46 starts++;
47 const selector = m[1]!.trim();
48 // What it starts from is only ever faded, shrunk to .95 or slid: never gone.
49 expect(m[2], `${f}: ${selector}`).toMatch(/opacity: 0|scale\(\.95\)|translateY/);
50 expect(m[2], `${f}: ${selector}`).not.toMatch(/scale\(\s*0\s*\)|display|visibility/);
51 // Outside the at-rule nothing holds that selector faded or shrunk: without it the element
52 // is whole.
53 const rest = css.replace(m[0], "");
54 for (const r of rest.matchAll(new RegExp(`${selector.replace(/[.*+?^${}()|[\]\\]/g, "\\$&")}\\s*\\{([^}]*)\\}`, "g")))
55 expect(r[1], `${f}: ${selector}`).not.toMatch(/opacity:\s*0[;\s]|scale\(\s*0?\.\d+\s*\)/);
56 }
57 }
58 }
59 expect(starts).toBeGreaterThanOrEqual(3);
60 });
61
62 test("the strong curve is the one ease, the palette and your own sent message do not move, a button gives under the press", async () => {
63 const { base } = await import("../src/web/style/base.ts");
64 const { components } = await import("../src/web/style/components.ts");
65 const { talkCss } = await import("../src/web/pages/talk_client.ts");
66 expect(base).toContain("--ease: cubic-bezier(.23, 1, .32, 1);");
67 expect(base).toContain("--ease-move: cubic-bezier(.77, 0, .175, 1);");
68 expect(components).toContain(".dialog.palette { transition: none; }");
69 expect(components).toContain(".btn:active { opacity: .85; transform: scale(.97); }");
70 expect(talkCss).toContain(".talk-log > [data-in]:not(.talk-person)");
71 // Reduced motion keeps the fade and drops the travel.
72 for (const css of [base, components]) expect(css).toContain("transition-property: opacity !important;");
73 });

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs