-
Notifications
You must be signed in to change notification settings - Fork 4k
Prevent page breaks inside blocks when printing #3507
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Prevent page breaks inside blocks when printing #3507
Conversation
🦋 Changeset detectedLatest commit: a8abe1d The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds CSS styling to prevent page breaks from occurring inside content blocks when printing documents. This improves the print experience by ensuring blocks remain intact across page boundaries.
- Adds
print:break-inside-avoid
CSS class to block elements - Creates a changeset documenting this print enhancement
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
File | Description |
---|---|
packages/gitbook/src/components/DocumentView/Blocks.tsx | Adds print-specific CSS class to prevent page breaks inside blocks |
.changeset/purple-poems-melt.md | Documents the print enhancement as a patch-level change |
The latest updates on your projects. Learn more about Argos notifications ↗︎
|
Before:

After:
