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

[css3-flexbox] "width: auto" behavior on a flexbox

From: Daniel Holbert <dholbert@mozilla.com>
Date: Wed, 11 Apr 2012 13:12:25 -0700
Message-ID: <4F85E5A9.5000705@mozilla.com>
To: www-style list <www-style@w3.org>
Hi www-style,

Basic question: what width should we use for the "width:auto" flexbox here:

 <div style="width: 500px">
   <div style="display: flexbox; width: auto; background: green">

Should it be the shrink-wrapped width of its contents "abc", or the size
of its containing block (500px)?  (per CSS 2.1 10.3.3 [1])

A while ago, I (perhaps incorrectly) got the impression from the spec
that auto-width flexboxes were supposed to shrinkwrap their contents.
However, I've just noticed that I can't find any mention of auto widths
in the current ED or WD, and the webkit nightly implementation doesn't
shrink-wrap by default.

So, I'm assuming my old "auto = shrink-wrap" interpretation is incorrect
and/or outdated, and we're instead supposed to follow CSS 2.1 10.3 on
this.  I'm hoping for confirmation that my updated interpretation is
correct. :)


[1] http://www.w3.org/TR/CSS21/visudet.html#blockwidth
Received on Wednesday, 11 April 2012 20:12:54 UTC

This archive was generated by hypermail 2.4.0 : Friday, 25 March 2022 10:08:14 UTC