Re: [CSS2.1] Yet another white-space issue with anonymous table objects

Although I may not be of much help here, perhaps someone could confirm 
or reject my own understanding of what should go on in this case.

    * My first assumption is that the space between the DIVs would
      reside in an an anonymous block.
    * Second assumption, SGM section 7.6.1 states that leading and
      trailing blanks should be removed in this block, so the anonymous
      block should in fact be treated as an empty anonymous block element.
    * Third assumption is that empty anonymous block elements should not
      be rendered (does not have a margin, padding, etc) and should thus
      not affect rendering of any sibling elements.

I would thus expect the result to be (if I understand 
"display:table-cell" correctly):
AB

Is this correct?

Regards,
Em2 Solutions AB
Michael Jansson



Boris Zbarsky wrote:
> 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 19:19:25 UTC