#144·ReLaXed

How to handle the page break with a top margin on the next page?

Author: froCreated Dec 14, 2019Updated Mar 17, 2020

Hi,

I'm struggling with something which appear to be simple but which is not.

Objective

I want to create a A4 document where:

  1. All the elements can touch the edge of the page
@page {
  -relaxed-page-size: A4;
  size: A4;
  margin: 0;
}
  1. A new "section" (aka chapter) should break to a new page
.section {
  page-break-before: always;
}
  1. Each new section should have a header and a content
.section {
  .header { ... }
  .content { ... }
}
  1. When a section content is to tall for the page, it should print on the next page, without the header but with a padding and the same border
.section {
  .content {
    -webkit-box-decoration-break: clone;
    border: 1mm solid green;
    padding: 3mm;
  }
}

Issue

The property -webkit-box-decoration-break: clone don't work (but should)

Expected

https://www.w3.org/TR/css-break-3/#valdef-box-decoration-break-clone

box-break

(the right part)


So... is there anyway to fix this -or- to achieve the page-break WITH a padding/border applied?

Thank you so much for your insights