Weasyprint splits list marker from text on natural pagebreak

Viewed 10

I have a styled ol item:

<ol>
    <li>Communication requirements</li>
</ol>

CSS as follows:

ol {
    list-style-type: none;
    counter-reset: item;
    margin: 0;
    padding: 0;
}

ol > li {
    counter-increment: item;
    font-weight: 700;
    display: table;
    margin-bottom: 10px;
    padding-top: 16px;
}


ol > li:before {
    content: counters(item, ".", decimal) ". ";
    display: table-cell;
    padding-right: 16px;
}

However when outputting to WeasyPrint there is a natural page break, the list marker is left behind:

image

How do I prevent this?

0 Answers
Related