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

Re: [css3-flexbox] getComputedStyle on flex property

From: Ojan Vafai <ojan@chromium.org>
Date: Tue, 3 Apr 2012 15:15:36 -0700
Message-ID: <CANMdWTs7YryCWNQo0DDrV+sgnSYTyCgy=TuwYL9+q1CyPXo1Kg@mail.gmail.com>
To: "Tab Atkins Jr." <jackalmage@gmail.com>
Cc: Tony Chang <tony@chromium.org>, www-style@w3.org
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 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 17:20:52 GMT