Files
hyperframes/packages/cli/src
miga-heygenandMiguel Angel f8d48bfcda fix: content_overlap uses the real CSS box for out-of-flow text
content_overlap measured text overlap via Range.getClientRects(),
which reflects a font's own ascent/descent metrics, not the CSS box:
a large font-size with a tight line-height keeps the same metrics-rect
height regardless of line-height while the real box scales normally.
An absolutely/fixed-positioned block has no layout-engine-reserved
space (unlike an in-flow flex/grid pair, already exempted), so a
genuine CSS-box gap between two such blocks could still measure as
overlapping via font metrics -- a false collision report immediately
followed by nothing actually unreadable on screen.

Adds visibleBoxClientRects, using getBoundingClientRect() instead of
Range rects (sharing the existing ancestor-overflow-clip logic via a
new clipRectsToOverflowAncestors helper), and switches to it for
out-of-flow elements only -- in-flow text keeps the existing
font-metrics measurement.

Deliberately narrower than "in-flow is always safe": the flex/grid
exemption only covers a pair sharing the same flex/grid ancestor, not
every in-flow pair, so an unrelated pair of ordinary in-flow blocks
with the same font-size/line-height mismatch remains a residual gap,
left for a follow-up rather than expanding this fix's scope.

Co-Authored-By: Miguel Angel <miguel.sierra@heygen.com>
2026-09-13 03:50:43 +00:00
..