- From: Tab Atkins Jr. <jackalmage@gmail.com>
- Date: Tue, 7 Sep 2010 17:06:01 -0700
- To: www-style list <www-style@w3.org>
This email is meant to address issue 199 on CSS2.1, which I volunteered to propose text for. http://wiki.csswg.org/spec/css2.1#issue-199 http://lists.w3.org/Archives/Public/www-style/2010May/0698.html On Sun, May 30, 2010 at 9:26 PM, Boris Zbarsky <bzbarsky@mit.edu> wrote: > Section 17.5.3 has this to say: > > The baseline of a cell is the baseline of the first in-flow line > box in the cell, or the first in-flow table-row in the cell, > whichever comes first. If there is no such line box or table-row, > the baseline is the bottom of content edge of the cell box. > > However nothing defines when line boxes are or are not present. If a block > contains only non-preserved whitespace, does it have any line boxes? The > end of section 9.4.2 suggests yes[1], but Gecko and Webkit seem to think the > answer is "no"[2]. Opera seems to think that even an empty block which has > no child boxes at all has a line box. > > It would be good to get this clarified, since this affects vertical > alignment of both table cells and inline-block elements and currently we > seem to not have very good interop here. > > -Boris > > [1] "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 do not end with a line feed must be treated > as zero-height line boxes." though this really does beg the > question of whether said line boxes exist at all; they just > have to be treated as 0-height if they do exist? > > [2] Testcase: > > <div style="display:table"> > <div style="display:table-row"> > <div style="display:table-cell;background:red"> > <div style="width:150px;height:150px;background:blue"> </div> > </div> > <div style="display:table-cell;background:green">a<br/>b</div> > </div> > </div> Based on the fact that Firefox, Webkit, and IE8 all agree on the rendering of this testcase, and supported by Anton's comments in a reply to the quoted email, I propose to replace the following paragraph in section 9.4.2: # 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 do not end with a line feed must be treated # as zero-height line boxes. ...with the following text: | If a line box would be created that would 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 would not end with | a line feed, the line box instead must not be created at all. This expresses what I want, though I'm not sure the language used is correct. I'm not sure how else to refer to the hypothetical entity that we're evaluating the existence of. ~TJ
Received on Wednesday, 8 September 2010 00:08:10 UTC