4

I read in this bugfix description that xhtmlrenderer should support the "orphans" and "widows" properties of CSS3 since Version R5. Using R8, it seems not to work.

div.textContent {
    orphans: 5;
    widows: 3;
}

But it looks like this:

Wrong paragraph breaking

The paragraph (a div block element) is broken into two pieces although it must not.

Any ideas or experience with this? Thanks!

Zeemee
  • 10,486
  • 14
  • 51
  • 81

1 Answers1

5

It is a bug in the Flying Saucer (xhtmlrenderer). There is a satisfyWidowsAndOrphans function in BlockBox.java, but it is called only after isNeedPageClear is called. I've created an issue in the issue tracker.

Note that the page-break-inside: avoid; css rule works.

Adam
  • 5,045
  • 1
  • 25
  • 31
  • I assume this is the answer. Thank you for the page-brake-inside hint, maybe i will apply it to `

    ` in certain circumstances.

    – Zeemee Feb 17 '11 at 06:51