You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(cli): flag overlapping text blocks in inspect (#1436)
The layout audit compares each element against its container, so two text
blocks that collide with each other — neither overflowing its own box —
render unreadable yet pass clean. Add a content_overlap check that pairs up
the solid text blocks and reports any two whose boxes intersect by more than
a fifth of the smaller box. Watermark-style text (low colour alpha) is
decorative and exempt; opt out of intentional stacking with
data-layout-allow-overlap.
Co-authored-by: Miguel Ángel <miguel07alm@protonmail.com>
Copy file name to clipboardExpand all lines: docs/packages/cli.mdx
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -19,7 +19,7 @@ npx hyperframes <command>
19
19
- Preview compositions with live hot reload (`preview`)
20
20
- Render compositions to MP4 locally or in Docker (`render`)
21
21
- Lint compositions for structural issues (`lint`)
22
-
- Inspect rendered visual layout for text overflow and clipped containers (`inspect`)
22
+
- Inspect rendered visual layout for text overflow, clipped containers, and overlapping text (`inspect`)
23
23
- Capture key frames as PNG screenshots (`snapshot`)
24
24
- Check your environment for missing dependencies (`doctor`)
25
25
@@ -559,7 +559,7 @@ This is suppressed in CI environments, non-TTY shells, and when `HYPERFRAMES_NO_
559
559
◇ 1 error(s), 0 warning(s), 0 info(s)
560
560
```
561
561
562
-
`inspect` bundles the project, serves it locally, opens headless Chrome, seeks through the composition, and reports text or elements that escape their intended boxes. It is designed for agent workflows: each finding includes a schema version, timestamp or collapsed timestamp range, selector, nearest container selector, measured bounding boxes, overflow sides, and a fix hint.
562
+
`inspect` bundles the project, serves it locally, opens headless Chrome, seeks through the composition, and reports text or elements that escape their intended boxes, plus pairs of text blocks that overlap each other (`content_overlap`). It is designed for agent workflows: each finding includes a schema version, timestamp or collapsed timestamp range, selector, nearest container selector, measured bounding boxes, overflow sides, and a fix hint.
563
563
564
564
| Flag | Description |
565
565
|------|-------------|
@@ -572,7 +572,7 @@ This is suppressed in CI environments, non-TTY shells, and when `HYPERFRAMES_NO_
572
572
|`--max-issues`| Maximum findings to print or return after static collapse (default: 80) |
573
573
|`--strict`| Exit non-zero on warnings as well as errors |
574
574
575
-
Use `data-layout-allow-overflow` on an element or ancestor when overflow is intentional, such as a planned off-canvas entrance. Use `data-layout-ignore` for decorative elements that should not be audited.
575
+
Use `data-layout-allow-overflow` on an element or ancestor when overflow is intentional, such as a planned off-canvas entrance. Use `data-layout-ignore` for decorative elements that should not be audited. Use `data-layout-allow-overlap` on a text element that is intentionally stacked over another (for example a lower-third caption above a heading).
576
576
577
577
`layout` remains available as a compatibility alias for the same visual inspection pass:
0 commit comments