- From: Morten Stenshorne <mstensho@opera.com>
- Date: Fri, 19 Jul 2013 12:47:23 +0200
- To: François REMY <francois.remy.dev@outlook.com>
- Cc: "www-style\@w3.org" <www-style@w3.org>
François REMY <francois.remy.dev@outlook.com> writes: >>> The test case contain a single block element >>> whose vertical padding makes it too tall for >>> a fragmentainer. >>> >>> Most browsers agrees that the break happens >>> at the pixel line where the bottom padding >>> starts to be too tall, but Firefox does make >>> use a line break inside the block element >>> itself in a way that looks odd to me. >> >> I think Gecko is right, and that WebKit and Presto are wrong. Breaking >> inside padding and borders should be avoided. >> >> http://dev.w3.org/csswg/css-break/#possible-breaks >> >> Gecko uses a class 2 opportunity (between the two line boxes). There are >> no class 1 or 3 break opportunities in the test case. > > Thank you for your answer. This is how I was reading it as well. > > However, I don't think there's such kind of "prefer (1) to (2) to (3)" > rule, so as soon as the browser finds all the breakpoints that are > possible, it may use them in any priority order. I guess the rule > chosen by the other browsers is "find the break point that's the > nearest the point you have to break anyway" which is why they end up > breaking inside the padding or border. Trying to make the fragmentainers as tall as possible makes sense, yes. The classes 1, 2 and 3 are just about different types of break opportunities, as far as I understand. I don't think one should be preferred over another. http://dev.w3.org/csswg/css-break/#best-breaks The spec isn't very strict about this, other than "don't break more than you have to" and "don't break inside truly unbreakable stuff". But it also seems to suggest that fragmentainer heights be balanced (like in multicol?), but that seems weird to me. If you have a text document that needs one and a half pages, should you then make both pages 75% full, rather than filling the first one completely and leaving the second one half empty? > What I find strange in the Gecko behavior is the way the break is > vertically "extended" to make the box fit the column. I can't find that > in the spec anywhere, nor does it seems very logical to do so. http://dev.w3.org/csswg/css-break/#break-decoration Also here Gecko seems to be right. "[I]ts content box extends to fill any remaining fragmentainer extent" -- ---- Morten Stenshorne, developer, Opera Software ASA ---- ---- Office: +47 23692400 ------ Mobile: +47 93440112 ---- ------------------ http://www.opera.com/ -----------------
Received on Friday, 19 July 2013 10:47:40 UTC