-
Notifications
You must be signed in to change notification settings - Fork 185
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
improve pagination while printing #41
base: main
Are you sure you want to change the base?
Conversation
Avoid widows and orphans, page breaks after headlines (fixes upstream iainc#33)
Unfortunately, in our testing on macOS 10.15.4 this technique did not affect pagination in any way. |
I'm developing on 10.13.6 so I had to set up a VM with 10.15.4 to test. On first view I thought you were right and the change does not work in 10.15. But then I found out, it is the way of testing that leads to false negative results: Pressing |
An easier way to refresh the print CSS is to switch to another template, briefly open the print window and switch back to the template you are developing on. |
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.
Thank you for this pull request, and for thoroughly testing it. After more testing, I can confirm it works. I’m not sure what happened the last time we tested it, but we’re very happy that this long-standing problem can be resolved.
In addition to the change proposed in the comment on widows
and orphans
, I’d appreciate it if you could adjust the commit message with past tense, proper sentence capitalization, and a period at the end, following the style we use in this repo. After that, I‘ll merge the changes.
@@ -61,11 +61,50 @@ html { | |||
@media print { | |||
.markdown-body { | |||
--horizontal-padding: 75px; | |||
widows: 2; /* avoid single lines at... */ |
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.
This should probably be applied to p
:
.markdown-body p {
widows: 2;
orphans: 2;
}
Avoid widows and orphans, page breaks after headlines (fixes #33)