W3C home > Mailing lists > Public > www-style@w3.org > January 2009

Re: [CSS21] Concern about anonymous table objects and whitespace

From: Boris Zbarsky <bzbarsky@MIT.EDU>
Date: Fri, 23 Jan 2009 11:09:23 -0500
Message-ID: <4979EBB3.4040101@mit.edu>
To: "Tab Atkins Jr." <jackalmage@gmail.com>
CC: fantasai <fantasai.lists@inkedblade.net>, www-style@w3.org

Tab Atkins Jr. wrote:
> Well, only if you're throwing around table-* display types, which
> despite their usefulness are still definitely minority display types
> (and I expect them to stay that way).

Interestingly enough, I actually came across a use case my proposal 
would break this morning.  See 
http://stackoverflow.com/questions/471636/centered-ul-wont-expand-horizontally-in-ff-opera-works-in-safari-ie6-7-8 
(which links to an example page at 
http://deadguy.reliccommunity.com/stuffbox/testinggrounds/display-table.html 
in case the stackoverflow page goes away).

The markup basically looks like this, stripped down:

   <ul style="display: table">
     <li style="display: inline-table">
       <h1 style="display: table-cell">Some header text</h1>
       <dl style="display: table-cell">
         <dt style="display: inline">Something</dt>
         <dd style="display: inline-block">Something else</dd>
         <dt style="display: inline">And more</dt>
         <dd style="display: inline-block">And yet more</dd>
       </dl>
     </li>
   </ul>

except there are several such <li> blocks.  So it seems like this sort 
of thing really is being used in the wild, and this isn't even a 
completely ridiculous use case (just want a table with the list-items as 
cells, but each list-item is also a table itself).

> I can see problems in the case that, say, a display:table container
> gets switched to display:block, perhaps by script, which would cause
> its contents to be completely suppressed.  Is it possible for CSS to
> do a display-orphaning, analogous to the normal table orphaning but
> without actual DOM changes?

I don't think that would be desirable....

>> He also pointed out that there is existing spec text that requires the sort
>> of lookahead that makes me unhappy, and in particular that blocks inside
>> inlines require it.
> 
> Is that truly a display issue, or is that part of the HTML algorithm?

Display.  We're talking things like:

   <div style="display: inline">
     <div style="display: block"/>
   </div>

-Boris
Received on Friday, 23 January 2009 16:23:31 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 17:20:15 GMT