Prevent page breaks inside blocks when printing (#3507)

This commit is contained in:
Nolann B.
2025-07-28 18:08:08 +02:00
committed by GitHub
parent 6b9f6b5b79
commit d02465823f
2 changed files with 6 additions and 1 deletions
+5
View File
@@ -0,0 +1,5 @@
---
'gitbook': patch
---
Prevent page breaks inside blocks when printing
@@ -85,7 +85,7 @@ export function UnwrappedBlocks<TBlock extends DocumentBlock>(props: UnwrappedBl
key={node.key || `${node.type}-${index}`}
block={node}
style={[
'mx-auto page-width-wide:mx-0 w-full decoration-primary/6',
'mx-auto page-width-wide:mx-0 w-full decoration-primary/6 print:break-inside-avoid',
node.data && 'fullWidth' in node.data && node.data.fullWidth
? 'max-w-screen-2xl'
: 'max-w-3xl',