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

Re: [css3-flexbox] "flex-basis: auto" means completely different things as specified value vs. computed value

From: fantasai <fantasai.lists@inkedblade.net>
Date: Tue, 05 Jun 2012 19:45:08 -0400
Message-ID: <4FCE9A04.8000305@inkedblade.net>
To: www-style@w3.org
On 06/04/2012 05:25 PM, Daniel Holbert wrote:
> On 06/04/2012 10:53 AM, Tab Atkins Jr. wrote:
>>> MAIN CONCERN: It's weird to have a particular value ("auto" in this
>>> case) mean two completely different things as a specified value vs. as a
>>> computed value.
>> Yeah, it's a little weird, but the alternative is to come up with
>> *another* term meaning the same thing as 'auto', just for stacked-auto
>> situations like this.
> That's _one_ alternative (the first one I mentioned at the end of this
> email), but it's not the only one.
> The other/better alternative (which I was lobbying for) is to make
> "flex-basis:auto" simply compute to "auto", which has one and only one
> meaning.  (look at the 'width' or 'height' property and use that)
> As I noted before, that is how "auto" is specced for "width" and
> "height" (getComputedStyle hacks aside), so there's definitely precedent
> for this behavior.

The problem we run into here is a terminology one: how is the spec
supposed to refer to the effective flex basis value? We don't have
a term for something between the computed value and the used value. :(
Not that we can't come up with something, but it makes me wonder if
we're either creating or exposing a systemic problem here.

> Assuming we agree on that -- it sounds like you're saying we take the
> parent's computed value and set it set it as the child's _specified
> value_. (which might then compute to something else)
> With that clarification, this is still very bizarre, IMHO.  This means
> that the "auto" value that I inherit from my parent (in the scenario
> from my toplevel post) means something *completely* different on my
> parent vs. what it means on me.  (It means "start flexing at max-content
> size" on my parent, whereas it means "look at your width property" when
> I inherit it onto myself.)

Yes, this is clearly wrong! Maybe the cascade should say that the
inherited value (the parent's computed value) becomes both the specified
and computed value on the child?

Received on Wednesday, 6 June 2012 01:07:08 UTC

This archive was generated by hypermail 2.3.1 : Monday, 2 May 2016 14:39:00 UTC