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

Re: [css3-flexbox] getComputedStyle on flex property

From: Tab Atkins Jr. <jackalmage@gmail.com>
Date: Tue, 3 Apr 2012 14:48:15 -0700
Message-ID: <CAAWBYDDe0aoeQsZ=F0QuZXcCUKe39eo6KLYJOXFmcSboaA3x+w@mail.gmail.com>
To: Tony Chang <tony@chromium.org>
Cc: www-style@w3.org
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"?

~TJ
Received on Tuesday, 3 April 2012 21:49:04 GMT

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