Re: [css3-flexbox] getComputedStyle on flex property

On Tue, Apr 3, 2012 at 2:48 PM, Tab Atkins Jr. <jackalmage@gmail.com> wrote:

> On Tue, Apr 3, 2012 at 1:54 PM, Tony Chang <tony@chromium.org> wrote:
> > What should getComputedStyle return when called on the flex property?
>  Here
> > are some examples with my guesses:
> >
> > 1.
> > div.style.flex = 'none';
> > getComputedStyle(div).flex -> 0 0 auto
> >
> > 2.
> > div.style.flex = '1 2 3px';
> > getComputedStyle(div).flex -> 1 2 3px
> >
> > 3.
> > div.style.flex = '1 2 50%';
> > getComputedStyle(div).flex -> 1 2 50%
> >
> > 4.
> > div.style.flex = '1 2 1em';
> > getComputedStyle(div).flex -> 1 2 16px
> >
> > 5.
> > div.style.flex = '1 2 auto';
> > getComputedStyle(div).flex -> 1 2 auto
>
> Yes, these should all be correct.  I've editted the draft to specify
> this better.
>
> More interesting question: what is the result when the specified value
> is "1 10px"?  With my recent edit, the answer is "1 10px".  Should it
> instead be "1 0 10px"?


"1 0 10px" makes more sense to me and is more straightforward to implement.

Received on Tuesday, 3 April 2012 22:16:26 UTC