- From: Christian Biesinger <cbiesinger@google.com>
- Date: Thu, 31 Mar 2016 13:13:37 -0700
- To: Daniel Holbert <dholbert@mozilla.com>
- Cc: www-style list <www-style@w3.org>
I would argue that *for flex items*, width: auto should not be
considered definite because they shrink to fit.
E.g. in https://drafts.csswg.org/css-flexbox/#algo-main-item (3.B), I
don't think a column flexbox should consider a width:auto in a flex
item to be considered definite for the purpose of aspect ratio
calculations. What does the CSSWG think?
-Christian
On Thu, Mar 31, 2016 at 12:50 PM, Daniel Holbert <dholbert@mozilla.com> wrote:
> I think the flexbox spec's definition of "definite sizes" needs some
> clarification.
>
> The definition is as follows:
> # ...a definite size is one that can be determined
> # without measuring content, i.e. is a <length>,
> # a size of the initial containing block, or a
> # <percentage> that is resolved against a definite
> # size.
> https://drafts.csswg.org/css-flexbox/#definite-sizes
>
> I'll assert that the inner div in my sample-markup below *does* have a
> "definite size", but it doesn't fit the definition above.
>
> <div style="display:block; width: 500px">
> <div style="display:block; width:auto">Hello</div>
> </div>
>
> The inner div here gets a width of 500px, regardless of its contents,
> due to how "width:auto" works on block-level things inside of a block.
> This fits the *first* part of the definition ("can be determined without
> measuring content"), but it does not fit the more-explicit second part
> of the definition ("i.e. a <length>, a size of the initial containing
> block, or a <percentage>").
>
> So, the definition seems to be a bit contradictory right now, because
> the second half is more specific than the first half. Perhaps the
> "i.e." should be changed to "e.g." so that it's clearer that it's not
> intended to be an exhaustive list? Or, perhaps the "i.e." list just
> needs another example added to cover this scenario?
>
> Thanks,
> ~Daniel
>
Received on Thursday, 31 March 2016 20:14:25 UTC