diff --git a/web/scripts/audit-cdp.mjs b/web/scripts/audit-cdp.mjs index 51ac56d..541deac 100644 --- a/web/scripts/audit-cdp.mjs +++ b/web/scripts/audit-cdp.mjs @@ -639,6 +639,15 @@ const sig = (n) => const sameNode = (x, y) => { if (x.tag !== y.tag) return false; if (x.tag === "svg") return true; // icons: design vs library classes differ + // Leaf controls (buttons/links/labels) are identified by their text label: + // the ref and the app may name the same control with different classes + // (e.g. "selected" vs "segment selected"), so a class-list match alone + // mis-pairs them (and a classless ref button would otherwise match any + // sibling). Matching by label keeps the pairings stable. + if ( + (x.tag === "button" || x.tag === "a" || x.tag === "label") && x.text && y.text + ) + return x.text === y.text; const cx = [...x.classes].sort().join(" "); const cy = [...y.classes].sort().join(" "); return cx === cy || !x.classes.length || !y.classes.length; diff --git a/web/src/lib/components/kit/ColorField.svelte b/web/src/lib/components/kit/ColorField.svelte index a71a28f..28cedb6 100644 --- a/web/src/lib/components/kit/ColorField.svelte +++ b/web/src/lib/components/kit/ColorField.svelte @@ -8,7 +8,13 @@ chevron?: boolean; oninput?: (value: string) => void; } - let { label, value = $bindable(), dark = false, chevron = false, oninput }: Props = $props(); + let { + label, + value = $bindable(), + dark = false, + chevron = false, + oninput, + }: Props = $props(); function handle(e: Event) { value = (e.target as HTMLInputElement).value; @@ -20,51 +26,52 @@
- - {#if chevron}{/if} + + {#if chevron}{/if}
diff --git a/web/src/routes/preview/demo/WorkspaceHeader.svelte b/web/src/routes/preview/demo/WorkspaceHeader.svelte index 17c3529..adfdc1d 100644 --- a/web/src/routes/preview/demo/WorkspaceHeader.svelte +++ b/web/src/routes/preview/demo/WorkspaceHeader.svelte @@ -18,7 +18,8 @@
- {eyebrowA} / {eyebrowB} + {eyebrowA} / + {eyebrowB}
@@ -34,12 +35,12 @@ .eyebrow { font: 10px var(--font-mono); letter-spacing: 0.12em; - color: var(--muted); + color: var(--blue); margin-bottom: 18px; } .eyebrow span { margin: 0 7px; - color: var(--blue); + color: var(--muted); } .title-row { display: flex; @@ -52,9 +53,10 @@ margin: 0 0 16px; font-size: clamp(36px, 4vw, 64px); font-weight: 650; - line-height: 0.9; + line-height: 1; letter-spacing: -0.06em; color: var(--foreground); + max-width: 700px; } .lede { margin: 0;