← Back to example

Why Textproof Uses Real DOM, Not Pretext Math

Accuracy report — masterbranch.club landing page copy · 40 checks × 9 breakpoints = 360 measurements

279
Comparisons
214
Agree
44
False Alarms
21
Missed Issues

Overall Accuracy

77%
Agreement
214 agree — pretext and DOM gave the same verdict
44 false alarms — pretext said broken, DOM says fine
21 missed — pretext said fine, DOM found real issues

Accuracy by Mode

noWrap (width)
67
10
83%
wrap (line count)
147
41
10
74%

Whose Fault?

Pretext Math

95%
62 of 65 disagreements are pretext's fault.
41 false wrap warnings — overestimates text width, predicts wrapping that doesn't happen.
11 missed clippings — can't detect ancestor overflow:hidden.
10 missed line-drift — underestimates width by a few px, missing a line break.

Config Error

5%
3 of 65 disagreements are config errors.
Nav brand on mobile — config declared text hidden via hiddenBelowWidth, but CSS doesn't actually hide it. Trivially fixable.

Evidence: Failures Pretext Cannot Detect

Structural Blind Spot: Ancestor Clipping

Pretext measures text width in isolation. It has no concept of the DOM tree, so it cannot detect when a parent element's overflow:hidden clips content. This is a fundamental limitation — not a calibration issue.

blind spot FAIL /login — "Welcome"
Text: "Welcome" on login page · Cinzel, noWrap
375px viewport
text: 434.58px → clips at 375px
pretext says: PASS
real DOM: FAIL · viewport-clip
text width: 434.58px
viewport: 375px (iPhone SE)
rect.right: 476.58px (101px past edge)
clippedViewportX: true
blind spot WARN / Footer wordmark — "THE MASTER BRANCH"
Text: "THE MASTER BRANCH" · Cinzel, noWrap, intentional overflow with negative margins
375px viewport
text: 390.14px → overflows both sides
pretext says: PASS
real DOM: WARN · horizontal-clipping
text width: 390.14px
viewport: 375px (iPhone SE)
rect.left: -8px (negative margin)
clippedAncestorX: true

Math Drift: Line Count Mismatch

Pretext's glyph tables underestimate rendered width by 4-8%. When text is near the line-break boundary, a few pixels of drift tip one word to the next line. The 5% safety margin compensates for most cases but not all.

drift WARN / Hero tagline — "Build what you need."
Text from current landing-copy.ts · Hero tagline, should be 1 line on desktop
pretext says: PASS (1 line)
real DOM: WARN · 2 lines (+1 drift)
device: iPhone SE (375px)
container: 291px
cause: glyph table ~5% narrower than browser
drift WARN / Manifesto body 3 — "For those who trade candid feedback."
Text from current landing-copy.ts · Manifesto statement
pretext says: PASS
real DOM: WARN · +1 line drift
device: Tablet portrait (768px)
DOM lines: 3
baseline (desktop): 2
drift WARN / Closing heading — "Are you ready?"
Text from current landing-copy.ts · CTA prompt
pretext says: PASS (1 line)
real DOM: WARN · 2 lines on mobile
devices: iPhone SE, Android mid, iPhone Pro Max
cause: font size at mobile root (18px) pushes past container

Conclusion

Pretext math is useful but structurally incomplete.

What it gets right (77%): Basic text-fit classification. When text clearly fits or clearly overflows, pretext agrees with the DOM.

What it cannot do: Detect ancestor clipping (overflow:hidden), negative margin overflow, or CSS layout context. These require real DOM measurement. This is not a calibration problem — it is a category limitation.

What it gets wrong (16% false alarms): Overestimates text width for wrapped content, producing 41 false warnings about line-wrap drift that doesn't occur in the real browser.

Why Textproof uses Playwright: Real DOM measurement is the only way to catch all text layout issues. Pretext math can accelerate the search, but the final verdict must come from the browser.