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

[css-flexbox] definite sizes & "width:auto" inside of a block

From: Daniel Holbert <dholbert@mozilla.com>
Date: Thu, 31 Mar 2016 12:50:45 -0700
To: www-style list <www-style@w3.org>
Message-ID: <f183de17-47f6-d606-4099-dfa0cfbe005d@mozilla.com>
I think the flexbox spec's definition of "definite sizes" needs some

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.

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>

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?

Received on Thursday, 31 March 2016 19:51:18 UTC

This archive was generated by hypermail 2.4.0 : Friday, 25 March 2022 10:09:01 UTC