Re: [CSS2.1] [css3-page] page-break-inside inheritance

I fully support this suggestion. It solves the same issue I raised in 
http://lists.w3.org/Archives/Public/www-style/2007Sep/0000.html

On Wednesday 02 April 2008, fantasai wrote:
> the idea is
>
>    * In CSS2.1 make page-break-inside not inherit anymore, but still
>      discourage breaks inside its descendants: basically avoid breaking
>      at a break point with a page-break-inside: avoid ancestor (rather
>      than direct parent). (I believe this was Alex's proposal at some
> point, but we did not understand the negative implications of the current
> behavior when we discussed it.)
>
>    * In CSS3, suggest that the more ancestors with 'avoid' a break
>      opportunity has, the more it is to be avoided.
>
I think the intuitive way to look at the problem is; that no matter how or 
where you break inside the child of element you also break that element. If 
the element has a page-break-inside: avoid, you voilate that property when 
breaking inside one of it's children.
If you look at it that way, the CSS 3 extension follows simple from the CSS 
2.1 rule that you should find the best place to break, i.e. or the place that 
break as few rules as possible.

I believe this produces the visually best  most intuitive results. The uses I 
see of page-break-inside: avoid, is to avoid breaking elements where breaking 
would look bad, or be bad from a readability point of view. This could be 
elements with borders, or fancy backgrounds.  CSS 2.1 already suggest 
avoiding breaking elements with borders and page-break-inside:avoid could 
formalize that, if changed.

If you have elements with borders stacked inside each other, and you are 
forced to break the topmost of them, the most intuitive thing to do is to try 
to break between the next level of bordered elements. If the 
page-break-inside: avoid only has one level - breaking inside a child and 
thus breaking two borders is just as bad as breaking only one border. Only by 
removing the inheritance of page-break-inside and trying to voilate as few 
page-break-inside as possible can you accieve the best result.

In Bert's email, he touches the subject of how higher levels of level 1 
avoidance (page-break-inside: avoid) should correspond to level 2 avoidance 
(widows and orphans). Personally I think orphans and widows should still be 
allowed to overrule any number of level 1 avoid. Widows and orphans are a 
local breaking rule that typically doesn't extend far (only a couple of 
lines), where page-break-inside are element based and can extend to basically 
any size. Respecting a local rule when determining who many area rules to 
break should still produce optimal results in most cases. There are cases 
where this would lead to suboptimal results, for instance when font-size is 
large compared to the page sizes, but I would choose to consider those cases 
outside the scope of automated page-breaking and more like presentations, 
where you do manual page breaking.

Best regards
`Allan Sandfeld

Received on Wednesday, 16 April 2008 19:41:17 UTC