- From: Tony Chang <tony@chromium.org>
- Date: Tue, 3 Apr 2012 14:26:53 -0700
- To: Alex Mogilevsky <alexmog@microsoft.com>
- Cc: "www-style@w3.org" <www-style@w3.org>
- Message-ID: <CAL-=4P0BjD2kNqzkx2qve6t155_K-s_w83um2ujMcuD-6XN0Jw@mail.gmail.com>
Note that this is different from width/height for percentage values. getComputedStyle(div, 'width') on a percentage normally returns the computed pixel size. As you mentioned, auto is also different from width/height. Otherwise, it's the same. On Tue, Apr 3, 2012 at 2:19 PM, Alex Mogilevsky <alexmog@microsoft.com>wrote: > 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:27:21 UTC