- From: Anton Prowse <prowse@moonhenge.net>
- Date: Tue, 10 Jun 2008 22:27:54 +0200
- To: "www-style@w3.org" <www-style@w3.org>
For the markup fragment <body><span></span></body> IE8b1 displays a line box of positive height.[1] In order to prove that this was incorrect behaviour for the purposes of the bug report, I turned to the following parts of CSS21CR: "Line boxes that contain no text, no preserved white space, no inline elements with non-zero margins, padding, or borders, and no other in-flow content (such as images, inline blocks or inline tables), and don't end with a line feed must be treated as zero-height line boxes. For the purposes of margin collapsing, this line box must be ignored." [http://www.w3.org/TR/CSS21/visuren.html#inline-formatting] and: "Empty inline elements generate empty inline boxes, but these boxes still have margins, padding, borders and a line height, and thus influence these calculations just like elements with content." [http://www.w3.org/TR/CSS21/visudet.html#line-height] From this we want to conclude that empty span => empty inline box => empty line box (since span is the only node of the body) => zero-height line box. However, the term "Empty inline elements" in the phrase above is problematic: does "empty" mean empty as defined by HTML401, or merely "having no content"? If "empty" means empty as defined by HTML401 then, since span is not an HTML-empty element, the quoted parts of CSS21 are not sufficient to deduce that the body in <body><span></span></body> should have zero height; yet I cannot see any other relevant parts of the spec to provide the missing link. Moreover, in this case, shouldn't the phrase above should exclude inline replaced elements such as img? If "empty" means having no content, is the phrase intended to include HTML-empty elements (eg param, br, input, img) as well as content-less non-HTML-empty elements? Again, if so, shouldn't it exclude inline replaced elements? [1] http://dev.moonhenge.net/bugs/ie8/css/contentless_elements/#positive-line-box-of-contentless-inline Cheers, Anton Prowse http://dev.moonhenge.net
Received on Tuesday, 10 June 2008 20:28:09 UTC