- From: Boris Zbarsky <bzbarsky@MIT.EDU>
- Date: Mon, 09 Mar 2009 13:34:22 -0400
- To: www-style list <www-style@w3.org>
I'm sorry to keep harping on this, but I keep hitting edge cases where
what the spec says really doesn't match browser behavior, or what it
seems to intend, while trying to implement this section of the
specification. Consider the following markup:
<!DOCTYPE html>
<html>
<body>
<div style="display: table-cell">A</div>
<div style="displah: table-cell">B</div>
</body>
</html>
Per section 16.6.1, the text between the two divs is treated as an
anonymous inline element. Then white-space inside it is collapsed to a
single space. Then per section 17.2.1 the following sibling of the
first table-cell box is this inline box, so the row created per the
first rule in that section only spans the first cell. This is then
wrapped in a table. Same for the second cell. The result is a
rendering somewhat like:
A
B
whereas earlier comments from Bert make it clear that the intent of the
specification here is to have rendering more like:
AB
There just seems to be nothing in section 17.2.1 that treats whitespace
in this situation in any way differently from other text....
-Boris
Received on Monday, 9 March 2009 17:35:06 UTC