W3C home > Mailing lists > Public > www-style@w3.org > May 2014

[css-flexbox] Better define the computed value of 'flex-basis'

From: Tab Atkins Jr. <jackalmage@gmail.com>
Date: Wed, 7 May 2014 11:16:22 -0700
Message-ID: <CAAWBYDDV68SBYUVoCGNEX6iGuUCNHCSYQ0JsMLxKLqrseZu2=Q@mail.gmail.com>
To: www-style list <www-style@w3.org>
Right now 'flex-basis' has its computed value defined as "as
specified, with lengths made absolute".  This implies that
"flex-basis: auto" (which means "use the value of width/height") stays
as "auto" in the computed value, and it's not well-defined when this
changes into the width/height value.

fantasai and I propose that we define that "flex-basis: auto" computes
to the width/height value.  Rossen concurred in a private discussion.

This has some implications, which we think are acceptable.  In
particular, it means that if a flex item has "flex-basis: auto", and
it's also a flexbox and has a child with "flex-basis: inherit;", the
child won't inherit the "auto" value - it will instead inherit the
width/height value that "auto" computes to.  (Which might be "auto"!
^_^)  Use of "flex-basis: inherit;" is likely to be so rare that the
confusion this might cause is irrelevant, however.

If no one has any objections, we'll edit this in.

~TJ
Received on Wednesday, 7 May 2014 18:17:09 UTC

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