From 0d47d9dbdf05f2e295ad4b4fed2c4714c2a847e6 Mon Sep 17 00:00:00 2001 From: Ned Zimmerman Date: Fri, 18 Aug 2017 14:02:15 -0300 Subject: [PATCH] Prevent page breaks in the middle of a license. --- assets/book/styles/components/pages/_back-matter.scss | 1 + assets/book/styles/components/pages/_chapters.scss | 1 + assets/book/styles/components/pages/_front-matter.scss | 1 + assets/legacy/styles/_epub-house-style.scss | 1 + assets/legacy/styles/_pdf-house-style.scss | 1 + 5 files changed, 5 insertions(+) diff --git a/assets/book/styles/components/pages/_back-matter.scss b/assets/book/styles/components/pages/_back-matter.scss index d51cc5ac4..da5a38a22 100644 --- a/assets/book/styles/components/pages/_back-matter.scss +++ b/assets/book/styles/components/pages/_back-matter.scss @@ -47,6 +47,7 @@ div.index { font-size: $section-license-font-size; font-style: $section-license-font-style; margin-top: $section-license-margin-top; + page-break-inside: avoid; } img { diff --git a/assets/book/styles/components/pages/_chapters.scss b/assets/book/styles/components/pages/_chapters.scss index f2f4fca88..2e59b01db 100644 --- a/assets/book/styles/components/pages/_chapters.scss +++ b/assets/book/styles/components/pages/_chapters.scss @@ -17,6 +17,7 @@ font-size: $section-license-font-size; font-style: $section-license-font-style; margin-top: $section-license-margin-top; + page-break-inside: avoid; } img { diff --git a/assets/book/styles/components/pages/_front-matter.scss b/assets/book/styles/components/pages/_front-matter.scss index 95fd5d575..9cc89e0b9 100644 --- a/assets/book/styles/components/pages/_front-matter.scss +++ b/assets/book/styles/components/pages/_front-matter.scss @@ -74,6 +74,7 @@ div.epigraph { font-size: $section-license-font-size; font-style: $section-license-font-style; margin-top: $section-license-margin-top; + page-break-inside: avoid; } img { diff --git a/assets/legacy/styles/_epub-house-style.scss b/assets/legacy/styles/_epub-house-style.scss index a07ede8df..7dcdcc811 100644 --- a/assets/legacy/styles/_epub-house-style.scss +++ b/assets/legacy/styles/_epub-house-style.scss @@ -279,6 +279,7 @@ div.sidebar { font-size: 0.8em; font-style: italic; margin-top: 2em; + page-break-inside: avoid; } .license-attribution img { diff --git a/assets/legacy/styles/_pdf-house-style.scss b/assets/legacy/styles/_pdf-house-style.scss index deab9b7ea..d9282f18a 100644 --- a/assets/legacy/styles/_pdf-house-style.scss +++ b/assets/legacy/styles/_pdf-house-style.scss @@ -1373,6 +1373,7 @@ div.sidebar p + p { font-size: 0.8em; font-style: italic; margin-top: 2em; + page-break-inside: avoid; } .license-attribution img {