Skip to content

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

@fro

Description

@fro

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions