W3C home > Mailing lists > Public > www-style@w3.org > February 2013

Re: [css3-flexbox] transitions w/ min-width:auto not working in gecko

From: Daniel Holbert <dholbert@mozilla.com>
Date: Thu, 14 Feb 2013 15:27:54 -0800
Message-ID: <511D72FA.8000407@mozilla.com>
To: "Tab Atkins Jr." <jackalmage@gmail.com>
CC: Boris Zbarsky <bzbarsky@mit.edu>, www-style list <www-style@w3.org>
Actually, re-reading your post on that thread, it looks like you agreed.
Quoting you:
On 5/19/12 6:44 PM, Tab Atkins Jr. wrote:
>> I think the "New Computed Value" line is correct, the 'auto' keyword
>> should always be the computed value, and the second quoted piece of
>> prose should be changed to avoid the term "computes".
http://lists.w3.org/Archives/Public/www-style/2012May/0663.html

So we're doing the right thing, I think. :) That spec-prose-change just
never happened.

~Daniel


On 02/14/2013 03:24 PM, Daniel Holbert wrote:
> On 02/14/2013 03:08 PM, Tab Atkins Jr. wrote:
>> That's a spec violation. :/  http://dev.w3.org/csswg/css3-flexbox/#min-size-auto
> 
> FWIW, dbaron actually started a thread in May about that chunk of spec
> text being potentially-problematic.[1]  He and bz[2] suggested that the
> special behavior applies to the used value, not the computed value.
> 
> You had one post in that thread[3] responding to dbaron, but I'm not
> clear on whether you were agreeing with them or not.
> 
> [1] http://lists.w3.org/Archives/Public/www-style/2012May/0655.html
> [2] http://lists.w3.org/Archives/Public/www-style/2012May/0663.html
> [3] http://lists.w3.org/Archives/Public/www-style/2012May/0659.html
> 
>> Also, I don't understand what you mean.  Why do the flex containers
>> have to care?  It's the children that have the value, and which are
>> computing to min-content.
> 
> The flex containers perform the flex layout algorithm, which takes the
> children's min-width values as inputs. That doesn't really answer your
> question, though -- here's a more complete response:
> 
> [warning: gecko implementation details below]
> 
> I think you're imagine that a UA determines the computed value of
> "min-width:auto" on a node by inspecting its parent's computed style,
> and resolving "auto" to either "min-content" or "0" depending on the
> parent's "display" and "flex-direction" values.
> 
> That makes sense, I think, but in practice, that can't (currently) work
> in Gecko. When we're computing the value of a given property on a given
> node, we only allow it to inspect a subset of the parent's computed
> style (specifically, the properties that we store in the same "style
> struct" -- basically, a group of closely-related properties).  This
> allows inheritance to work (because we can see the value of our property
> on the parent) without the child needing access to *all* of the parent's
> computed style.
> 
> As it happens, min-width is stored in a different style-struct than
> 'display' and 'flex-direction', so it can't inspect those properties on
> the parent.  So, we can't actually resolve "min-width:auto" during
> style-computation -- so we leave it at "auto" and convert it
> as-necessary when it's used.
> 
> Anyway, this will all be moot if min-width:auto is removed, so it may
> not be worth worrying too much about.
> 
Received on Thursday, 14 February 2013 23:28:22 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 17:21:05 GMT