开发者

How to use CSS3 orphans and widows properties with xhtmlrenderer (flying saucer) R8?

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:

How to use CSS3 orphans and widows properties with xhtmlrenderer (flying saucer) R8?

The paragraph (a div block element) is broken into two pieces although 开发者_如何学编程it must not.

Any ideas or experience with this? Thanks!


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜