fix: remove overflow hidden from safeTextStyle (#3186)

overflow: hidden on Text elements in @react-pdf/renderer v4.x clips
content at its initial computed height, hiding any text after a line
break. minWidth/maxWidth/flexShrink already handle horizontal
containment so nothing else breaks.

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Simo
2026-07-01 20:59:00 +04:00
committed by GitHub
parent d3735ebe27
commit 4c8cc5c016
2 changed files with 0 additions and 5 deletions
@@ -4,5 +4,4 @@ export const safeTextStyle = {
minWidth: 0,
maxWidth: "100%",
flexShrink: 1,
overflow: "hidden",
} satisfies Style;
@@ -31,10 +31,6 @@ export const mergeStyles = (...styles: StyleInput[]): Style => Object.assign({},
export const mergeLinkStyles = (options: LinkStyleOptions = {}, ...styles: StyleInput[]): Style =>
mergeStyles(...styles, resolveLinkDecorationStyle(options));
// Increased from 1.2 to 1.3 to prevent descenders (g, p, y, etc.) from being
// clipped by the overflow:hidden applied in safeTextStyle on all Heading elements.
// At 1.5× heading font size, a lineHeight of 1.2 leaves insufficient room for
// the descender depth of many fonts, causing letters to appear visually cut off.
export const headerNameLineHeight = 1.3;
export type ResolvePlacementColorOptions = {