Skip to content

The design language that makes your AI harness better at design.

JavaScript

Merge corpus/fix-cramped-padding into corpus/integration

Paul Bakausd2d22da5c5e4
diff --cc browser-bundle/15-snapshot.js
index 210c16a27,0f26891d6..3f28aef07
--- a/browser-bundle/15-snapshot.js
+++ b/browser-bundle/15-snapshot.js
@@@ -27,9 -27,9 +27,9 @@@ const __SNAP_STYLE_PROPS =
"borderLeftColor", "borderLeftWidth", "borderLeftStyle", "borderRadius",
"borderRightColor", "borderRightWidth", "borderRightStyle",
"borderTopColor", "borderTopWidth", "borderTopStyle", "bottom", "boxShadow",
- "clip", "clip-path", "clipPath", "color", "content", "contentVisibility",
- "cssFloat", "direction", "display", "filter", "float", "fontFamily",
- "fontSize",
+ "clip", "clip-path", "clipPath", "color", "colorScheme", "content",
- "contentVisibility",
- "cssFloat", "display", "filter", "float", "fontFamily", "fontSize",
++ "contentVisibility", "cssFloat", "direction", "display", "filter", "float",
++ "fontFamily", "fontSize",
"fontStyle", "fontVariant", "fontVariantCaps", "fontWeight", "height",
"hyphens", "inlineSize", "inset", "insetBlock", "insetBlockEnd",
"insetBlockStart", "insetInline", "insetInlineEnd", "insetInlineStart",
diff --cc tests/oracle/DELTAS.md
index 09854c4bc,7b0e54529..5700da310
--- a/tests/oracle/DELTAS.md
+++ b/tests/oracle/DELTAS.md
@@@ -165,32 -165,40 +165,70 @@@ CLI 4.0.0 release; it is what the binar
- `cli-version`.
+## Recorded 2026-09-12: the URL scan reads the page after the reveal sweep
+
+`crates/browser` now runs the reveal sweep before it captures the page, and
+every deterministic pass reads that one post-reveal capture. The new fixture
+`tests/fixtures/antipatterns/scroll-reveal.html` is what holds that order: its
+left column carries faults a pre-reveal pass cannot see (a section at opacity 0
+skips the element checks), its right column carries the fade-in a pre-reveal
+pass reports as `buried-raster`. URL scans have no goldens, so the fixture is
+pinned by `crates/browser/tests/evidence.rs`; the goldens below move only
+because a file was added to the fixture directory the static engine walks.
+
+- `detect-fixture-json-scroll-reveal-html`, `detect-fixture-text-scroll-reveal-html`: new cases. The static engine has no reveal to run, so it reports the fade-in from the stylesheet; that is its correct reading of the source and the fixture says so in a comment.
+- `detect-dir-json-all-fixtures`, `detect-dir-text-all-fixtures`, `detect-dir-quiet-all-fixtures`, `detect-scope-type`, `detect-scope-both`, `detect-no-advisory-json`, `detect-no-advisory-text`: the four new findings are appended and the total moves from 419 to 423. No existing fixture's findings changed.
+
+## Recorded 2026-09-12: a fixture for the visual-contrast sampling decisions
+
+`tests/fixtures/antipatterns/visual-contrast-sampling.html` is new: the
+reduced false positives and protected true positives behind the visual pass's
+sampling fix (glass panel, filtered wrapper, transparent gradient stop, a
+ten-percent tint of the text's own color, vector avatar paint, gradient-clipped
+heading, faded accordion trigger, translucent pill on a pale photo). The static
+text scan reads the file like any other fixture; the only rule with an opinion
+about it is `gradient-text`, which fires twice on the one `background-clip:
+text` heading (the existing duplicate the CSS-text and element forms produce).
+The dir-wide goldens gain those two findings and their count moves 419 → 421.
+Nothing else in any golden changed: the fix is in the browser passes, which
+have no goldens (browser output depends on the machine).
+
+- `detect-dir-text-all-fixtures`, `detect-dir-json-all-fixtures`, `detect-dir-quiet-all-fixtures`, `detect-no-advisory-text`, `detect-no-advisory-json`, and the two new per-fixture cases `detect-fixture-text-visual-contrast-sampling-html` / `detect-fixture-json-visual-contrast-sampling-html`.
++
+
+ ## Recorded 2026-09-12: cramped-padding measures where the glyphs land
+
+ Corpus judging (both judges, 88 of 111 representatives) found the rule reading
+ the `padding` property and the child's border box rather than the text. A
+ 40px flex row centres a 14px label on zero padding; an accordion row's inset
+ lives on a button two levels down; a collapsed panel and a screen-reader
+ heading paint nothing at all. The rule now decides on `getDirectTextRect`, the
+ union of an element's own text-node rects clamped to the box that paints them,
+ and ignores a transparent border and a white box on an unpainted light canvas.
+ The file scan has no layout to measure, so it follows the padding down instead:
+ an element holding one element and no text of its own hands the question to
+ what it wraps, which is how `wrapper > h3 > button` and `panel > div > p` now
+ read.
+
+ Every golden below was re-recorded from the binary and reviewed by hand; none
+ is exempted from comparison, so the oracle still pins each one.
+
+ Goldens that moved, and why:
+
+ * `detect-fixture-json-flush-against-border-html` and
+ `detect-fixture-text-flush-against-border-html`: 6 findings to 11. The
+ fixture grew five reduced cases from the corpus false positives plus
+ `flag-overrun-field`, the shape both judges called harmful. A URL scan of
+ the fixture reports the six `flag-` cases and nothing else; the file scan
+ adds the five pass cases it has no layout to clear, listed by name in the
+ fixture header and pinned in `crates/html/tests/static_flush.rs`.
+ * `detect-fixture-json-edge-flush-cards-html` and
+ `detect-fixture-text-edge-flush-cards-html`: 3 findings to 0. Each was a
+ `.scroller` whose cards carry 12px of padding one level below its own
+ child, so the text was never near the edge. A URL scan of that fixture
+ reports no cramped-padding finding either, before or after this change.
+ * `detect-dir-json-all-fixtures`, `detect-dir-text-all-fixtures`,
+ `detect-dir-quiet-all-fixtures`, `detect-scope-layout-text`,
+ `detect-scope-both`, `detect-no-advisory-json`, `detect-no-advisory-text`:
+ the sweeps carry the same two files, 419 findings to 421. No other rule's
+ output moves.