From affb42f79cf758dd657b72cfbd84bddd483ce813 Mon Sep 17 00:00:00 2001 From: Romain Lesur Date: Sat, 4 Apr 2020 13:34:18 +0200 Subject: [PATCH] avoid page breaks after section titles and inside subsections fix #170 --- NEWS.md | 3 +++ inst/resources/css/resume.css | 10 ++++++++++ 2 files changed, 13 insertions(+) diff --git a/NEWS.md b/NEWS.md index fd152487..3bbe4cc1 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,5 +1,8 @@ # CHANGES IN pagedown VERSION 0.10 +## BUG FIXES + +- In `html_resume()` template, avoid page breaks after section titles and inside subsections (thanks, @kevinrue, #170). # CHANGES IN pagedown VERSION 0.9 diff --git a/inst/resources/css/resume.css b/inst/resources/css/resume.css index 8ba81d39..659f959a 100644 --- a/inst/resources/css/resume.css +++ b/inst/resources/css/resume.css @@ -396,6 +396,16 @@ h1, h2{ font-style: normal; } +/* Page breaks */ + +h2 { + break-after: avoid; +} + +.blocks { + break-inside: avoid; +} + /* Paged.js viewer */ @media screen {