- From: Simon Sapin <simon.sapin@kozea.fr>
- Date: Wed, 30 Nov 2011 11:22:07 +0100
- To: www-style@w3.org
Le 29/11/2011 17:45, fantasai a écrit : > At TPAC we resolved to clarify CSS2.1 to say that the > 'page-break-before' and > 'page-break-after' properties don't create a break if you're at the > top of the > page, where at the top of the page means no content has been placed, with > borders not counting as content but empty zero-height blocks counting > as content. Do anonymous blocks containing only collapsible whitespace count as content too? Example document fragment: <div style="white-space: normal"> <p>Something</p> <p>Something else</p> </div> It is my understanding of sections 9.2, 9.4.1 and 16.6.1 of CSS 2.1 that white-space between blocks ends up in a zero-height anonymous block: The white-space is text and thus generates an anonymous inline box. Since this inline-level box has block-level siblings, it is as per 9.2.1.1 wrapped in an anonymous block. The first part of the white-space processing model this white-space to a single space. Later (during layout), the second part removes this space as it is at the beginning of the line. We end up with an anonymous block containing only an empty line box. 9.4.2 states that this line box must be treated as either zero-height or not existing. The block thus also has a zero height. So, by putting together parts from all over the spec, I came to the conclusion that such white-space is invisible and does not affect the layout, but still exists in the formatting structure (the box tree) as an anonymous block. Is this correct? What about page breaks then? In any case, this could be made more explicit. I knew that such white-space did not have any effect but I was surprised not to find it mentioned in the white-space processing (16.6.1). Regards, -- Simon Sapin
Received on Wednesday, 30 November 2011 10:22:59 UTC