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

[css3-flexbox] Does "width" property on a flex-item affect its used value of "min-width:auto"?

From: Daniel Holbert <dholbert@mozilla.com>
Date: Wed, 26 Sep 2012 21:08:04 -0700
Message-ID: <5063D124.80308@mozilla.com>
To: www-style list <www-style@w3.org>
Hi www-style,

Suppose you have this simple flex-item in a horizontal flex container:
with no fancy style rules affecting it.

So it has "min-width:auto" (the default), and that resolves to the
min-content width -- in this case, the width of the text "abc".

NOW -- suppose we set "width" on the div, e.g.:
 <div style="width:1000px">abc</div>

MY QUESTION: Does the "width" property there affect the used value of
"min-width: auto" that we pass to the flex algorithm?

My interpretation: I don't think it should -- to me, the min-content
width is a function of the div's contents, and it necessarily doesn't
depend on the div's "width" property. (Otherwise, it seems that "width:
min-content" would be problematic to define).

I'm asking because Webkit's current implementation[1] seems to disagree
with me on this (they render the above flex-item as if it had
"min-width: 1000px"), and I want to sanity-check my own understanding.

(For reference, I filed https://bugs.webkit.org/show_bug.cgi?id=97747 on
this, but that may or may not be a valid bug depending on the outcome of
this thread.)

[1] I tested Chrome dev channel, ver. "23.0.1271.6 dev", Linux x86_6
Received on Thursday, 27 September 2012 04:08:34 UTC

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