Re: CSS3 Values and Units: Some proposals

On Fri, Mar 19, 2010 at 2:08 AM, Markus Ernst <derernst@gmx.ch> wrote:
>> What precisely are your use-cases?  Anything related to overall page
>> structure (my commonest requirement for equal-height or equal-width or
>> whatnot) can be done really easily by Template, or with a little bit
>> of trickery by Table (the latter has the advantage of existing).  Do
>> you have specific examples of setups within a page that need matched
>> heights or widths that can't be easily handled by using the table-*
>> display types?  (I have some that I've collected over my last few
>> projects, which I'll write up in a bit).
>
> The main issue with using the table-* display types for layout purposes is the fact that it affects the document structure. You have to put the elements of a document in the order of the "table-cell" type elements needed for the desired layout. That's basically the same as with using layout tables.

I agree that the ordering requirements imposed by Table Layout (plus
the occasional need for wrapper elements to separate rows) is
suboptimal in some cases.  It's not great for site templates because
of that, for example (though my old company's website uses Table
Layout and just accepts the non-optimal source order and wrapper
element as a justified cost for the benefits).  I disagree that it's
as bad as layout tables, which combines all the badness occasionally
imposed by table-* layout plus semantic abuse, but shrug.

Table Layout is still directly useful, without the badness, for a
number of cases.  For example, horizontal navbars, traditionally done
with floats, work *very* well with Table Layout.  They can even
auto-space things so that the separate nav elements have approximately
the same amount of space between them (which is a substantially
different thing than spacing them equally).  No extra containers or
anything are needed - just set the <ul> to be display:table and the
<li> to be display:table-cell.

So, this is why concrete use-cases are useful, because then we can
evaluate precisely how existing solutions succeed or fail and judge
new solutions by how well and easily they solve the use-cases.  Do you
have some to share with us?  Anything you've used in your own design
where you needed things to be equal-height, or equal-width, or
whatnot, and couldn't get CSS to do what you needed?

~TJ

Received on Friday, 19 March 2010 14:09:47 UTC