W3C home > Mailing lists > Public > www-style@w3.org > August 2012

Re: [css3-flexbox] rules for tables as flex items

From: fantasai <fantasai.lists@inkedblade.net>
Date: Mon, 06 Aug 2012 18:19:40 -0700
Message-ID: <50206D2C.2050004@inkedblade.net>
To: www-style@w3.org
On 08/06/2012 01:22 PM, L. David Baron wrote:
> I find the rules for handling tables as flex items contained in the
> last paragraph of http://dev.w3.org/csswg/css3-flexbox/#flex-items
> (before section 4.1):
>    # On a flex item with ‘display: table’, the table wrapper box
>    # becomes the flex item, and the ‘order’ and ‘align-self’
>    # properties apply to it. However, like ‘width’ and ‘height’, the
>    # ‘flex’ longhands apply to the table box as follows: The contents
>    # of any caption boxes contribute to the calculation of the table
>    # wrapper box's min-content and max-content sizes.  However, the
>    # flex item's final size is calculated by first laying out the
>    # captions, and then performing layout as if the distance between
>    # the table wrapper box's edges and the table box's content edges
>    # were all part of the table box's border+padding area, and the
>    # table box were the flex item.
> to be somewhat unclear.
>
> In particular, I find the following things confusing:
>
>    # However, like ‘width’ and ‘height’, the ‘flex’ longhands apply
>    # to the table box as follows: The contents of any caption boxes
>    # contribute to the calculation of the table wrapper box's
>    # min-content and max-content sizes.
>
> This sentence (or two) is confusing in two ways.  First, the capital
> "T" following the colon makes it unclear if the colon is intended to
> introduce multiple sentences (in which case it should probably
> introduce something in list markup, or use a period rather than a
> colon) or just the single sentence (in which case the T should be
> lowercase).
>
> Second, it's talking about how the properties apply to the table
> box, but then continues by saying that caption boxes contribute to
> the table wrapper box.

Ok, fixed by reordering those two sentences and lowercasing the next
letter.

> Then:
>    # However, the flex item's final size is calculated by first
>    # laying out the captions, and then performing layout as if the
>    # distance between the table wrapper box's edges and the table
>    # box's content edges were all part of the table box's
>    # border+padding area, and the table box were the flex item.
>
> This seems to presume that caption layout can happen first.
> However, if my memory is correct, there are cases in CSS 2.1 where
> the size of the caption depends on the size of the table (in
> particular, because the caption can't be wider than the table).
> This means that the caption's width can't be determined before
> determining the table's width.  If "first laying out" includes
> layout out the caption before determining the width of the table,
> then this seems to be a contradiction; if it doesn't then I don't
> see why there's an ordering constraint at all or what it means.

Hmmm. What if we removed that part, like this?

http://dev.w3.org/csswg/css3-flexbox/#table-items
   # However, like ‘width’ and ‘height’, the ‘flex’ longhands apply
   # to the table box as follows: the flex item's final size is
   # calculated by performing layout as if the distance between the
   # table wrapper box's edges and the table box's content edges
   # were all part of the table box's border+padding area, and the
   # table box were the flex item.

~fantasai
Received on Tuesday, 7 August 2012 01:20:08 GMT

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