`text-indent` overflows the container box on line 0
Author: yenbekbayCreated May 11, 2026Updated May 11, 2026
Description / Observed Behavior
With width: W, text-indent: I, line 0 ends at box_left + W + I (overflowing the box by I). Lines 2+ wrap correctly at W. The indent is applied during positioning but not subtracted from the wrap budget.
In the example above (maxWidth: 190px, textIndent: 40px), line 0 (This is a multiline) extends ~40px past the orange box's right edge.
Expected Behavior
Per CSS, line 0's available text width is W - I, so its right edge should match lines 2+ (box_left + W).
Reproduction
<div style={{
maxWidth: '190px',
textIndent: '40px',
backgroundColor: '#ff6c2f',
}}>
This is a multiline text that should have the first line indented by 40 pixels
</div>Additional Context
Introduced in #733 (Satori 0.23.0). Tested against @vercel/[email protected] bundled with Next.js 16.2.6.
Workaround: setting width = container - I keeps line 0 inside the box but truncates lines 2+ by I, since a single width applies to every line.
Source: vercel/satori