Delete :before and :after when the element is split
If an element page is split between two pages:
- delete
:before
on the second part of the element (on the second page) - delete
:after
on the first part of the element (on the first page)
In the following image, all the paragraphs are numbered by a counter on :before
and :after
, we can see problems from paragraph 3 witch is splited:
- there are two elements
:before
on the same paragraphe - there are also two elements
:after
; the "after 3" is gone but the "after 4" shows us that it is just hidden because it does not return to the end of the page. It must be deleted.