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

Re: layout idea

From: David Hyatt <hyatt@apple.com>
Date: Fri, 20 Mar 2009 15:03:20 -0500
Cc: "Tab Atkins Jr." <jackalmage@gmail.com>, Jonathan Snook <jonathan.snook@gmail.com>, "www-style@w3.org" <www-style@w3.org>
Message-id: <78CCD332-878F-4049-9C95-AF2388C126BD@apple.com>
To: Brad Kemper <brad.kemper@gmail.com>
On Mar 20, 2009, at 11:47 AM, Brad Kemper wrote:

>
> On Mar 19, 2009, at 12:39 PM, David Hyatt wrote:
>
>>> No. We don't flow contents *into* cells. We *absolutely position*  
>>> contents to align with edges of particular cells.
>>>
>>
>> Three kinds of positioning:
>>
>> (1) table-position on a display:table-cell.  The object actually  
>> becomes the cell at that position.  A pseudo-element can't refer to  
>> this cell position when this is done.
>> (2) table-position on a normal flow object like a block.  The  
>> object is placed *into* the cell at that position.  If no cell  
>> exists at that position, then an anonymous one gets made.  A pseudo  
>> element can be used to style this cell.
>> (3) position:absolute with grid units.  Provides out of flow  
>> alignment to cells in tables.
>
> Please note that I am not totally against #2, above. Just somewhat  
> against it, because I think it confuses the understanding of the  
> rest of it, complicates things that would otherwise be simpler (the  
> automatic wrapping of cells into new rows), and is unnecessary for  
> the goals of source-order independence. I think if you had #1 above,  
> plus row-spans/col-spans, it would satisfy the vast majority of  
> layout needs, and also be a great boon to creating table-like  
> structures out of non-table HTML structures (like definition lists,  
> or headline/paragraph combinations).
>
> #3 is a "nice-to-have" for abs-pos items to align with table-display- 
> based layouts. #2 just seems extraneous. Is it so that you can put a  
> group of things, like paragraphs, into a cell without actually  
> having a wrapper of some sort (like <DIV class="article">) around  
> them first?
>

It would certainly be a simplification to just not support #2.  Maybe  
we could at least say that the anonymous cell created to wrap those  
objects would be fitted intelligently into the grid, rather than  
always getting a new row, etc.

Really you are right that anonymous cells are just bad news.  There  
are all sorts of bugs/issues related to them like... do anonymous  
cells in a table with cellpadding honor the cellpadding?  Some  
browsers say yes. Some say no.  How do you indicate that vertical- 
align should inherit in an anonymous table cell with no pseudo-element  
hook?  You can't, leading to weird vertical-align differences in CSS  
tables vs. HTML tables.  Anonymous cells are problematic and annoying,  
and so a design that favors explicit cells is fine by me.

The real question (and this is more one for designers) is if #2 is  
really needed to achieve any particular layouts.  I'm not really sure.

We could still have pseudo element hooks for the rows and columns  
created by a grid.

dave
(hyatt@apple.com)
Received on Friday, 20 March 2009 20:04:03 GMT

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