Hover capture via forced pseudo-state, text-wrap support, per-viewport video source re-selection, svg paint recovery, semantic tokens & section naming
Capture: - Hover/focus states are driven with CDP CSS.forcePseudoState instead of moving the real cursor - transparent full-viewport overlay layers were swallowing every pointer hover, silently capturing zero hover states on hover-rich sites - text-wrap (balance/pretty) captured and emitted (Tailwind text-balance/ text-pretty, arbitrary fallback) - Videos re-run <source> selection per viewport before frame-0 normalization: resize-without-reload kept aspect-gated variants stuck on the load-time choice, poisoning mobile ground-truth screenshots - svg roots capture their computed paint; fill="none" with a computed paint (the fill-current pattern) recovers the real color instead of rendering blank Tokens & naming: - Full CSS-Color-4 parsing (oklab/oklch/lab/lch/hsl) so modern colors cluster and earn semantic roles; visually-equal literals share one token; decoration/gradient/shadow colors consult the palette before minting opaque tokens (ridge: 45 opaque tokens -> 15, anthropic: 12 -> 7) - Expanded role vocabulary (background/foreground/primary/accent/border/ surface/muted) with deterministic tiebreaks and a chroma guard - Section names mine CMS section ids and js-* hooks with hashy-suffix stripping (split_callout_JtTWTt -> split-callout-section) 364 tests pass (42 new), typecheck clean; determinism verified by double-regen byte-comparison on two reference runs. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Fable 5
parent
db0054e43b
commit
6e4921884c
@@ -133,3 +133,21 @@ describe("declToUtil letter-spacing sub-0.1px preservation", () => {
|
||||
assert.equal(declToUtil("width", "204.9994px"), "w-[205px]");
|
||||
});
|
||||
});
|
||||
|
||||
// text-wrap: modern heading line-balancing. `balance`/`pretty` rebalance where a title wraps;
|
||||
// without emitting them a two-line heading breaks differently in the clone. Tailwind v4 has the
|
||||
// named utilities text-balance / text-pretty / text-nowrap / text-wrap; anything else (e.g.
|
||||
// `stable`) falls through to the arbitrary property escape.
|
||||
describe("declToUtil text-wrap", () => {
|
||||
it("maps balance and pretty to the named Tailwind v4 utilities", () => {
|
||||
assert.equal(declToUtil("text-wrap", "balance"), "text-balance");
|
||||
assert.equal(declToUtil("text-wrap", "pretty"), "text-pretty");
|
||||
});
|
||||
it("maps wrap and nowrap to their named utilities", () => {
|
||||
assert.equal(declToUtil("text-wrap", "wrap"), "text-wrap");
|
||||
assert.equal(declToUtil("text-wrap", "nowrap"), "text-nowrap");
|
||||
});
|
||||
it("falls back to the arbitrary property for an unmapped value", () => {
|
||||
assert.equal(declToUtil("text-wrap", "stable"), "[text-wrap:stable]");
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user