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

RE: [css3-flexbox] getComputedStyle on flex property

From: Alex Mogilevsky <alexmog@microsoft.com>
Date: Tue, 3 Apr 2012 21:19:23 +0000
To: Tony Chang <tony@chromium.org>, "www-style@w3.org" <www-style@w3.org>
Message-ID: <D51C9E849DDD0D4EA38C2E539856928413A92BF0@TK5EX14MBXC261.redmond.corp.microsoft.com>
Are values for preferred-size same as what width/height would have in computed style if they had same specified values? Then yes, it should be same.

Not sure what preferred-size should be when it is 'auto' and corresponding width or height are not auto. I think it should still be 'auto' as you suggest.

From: tc@google.com [mailto:tc@google.com] On Behalf Of Tony Chang
Sent: Tuesday, April 03, 2012 1:55 PM
To: www-style@w3.org
Subject: [css3-flexbox] getComputedStyle on flex property

What should getComputedStyle return when called on the flex property?  Here are some examples with my guesses:

div.style.flex = 'none';
getComputedStyle(div).flex -> 0 0 auto

div.style.flex = '1 2 3px';
getComputedStyle(div).flex -> 1 2 3px

div.style.flex = '1 2 50%';
getComputedStyle(div).flex -> 1 2 50%

div.style.flex = '1 2 1em';
getComputedStyle(div).flex -> 1 2 16px

div.style.flex = '1 2 auto';
getComputedStyle(div).flex -> 1 2 auto

Does that seem correct?
Received on Tuesday, 3 April 2012 21:20:10 GMT

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