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

Re: [css3-flexbox] Computed value and flex-align/flex-item-align.

From: Tab Atkins Jr. <jackalmage@gmail.com>
Date: Thu, 26 Jan 2012 17:26:37 -0800
Message-ID: <CAAWBYDAD71WVuzfAcE+5RzUriH2en5_FsRXo603HZsoqqAG7JA@mail.gmail.com>
To: Alex Mogilevsky <alexmog@microsoft.com>
Cc: Daniel Holbert <dholbert@mozilla.com>, "www-style@w3.org" <www-style@w3.org>
On Thu, Jan 26, 2012 at 5:14 PM, Alex Mogilevsky <alexmog@microsoft.com> wrote:
> ± From: Tab Atkins Jr. [mailto:jackalmage@gmail.com]
> ± Sent: Thursday, January 26, 2012 4:36 PM
> ±
> ± If you ask for the specified value (via the OM APIs that let you query
> ± el.style or examine the stylesheet directly), you'll get back 'auto'.
> ± If you call getComputedValue(el).flexItemAlign, though, you'll get the
> ± flexbox's 'flex-align' value, because it's already resolved the computed
> ± value.
> ±
> ± This is standard behavior for these sorts of properties.
>
> Interesting. You mean getComputedStyle(), the one that returns used values, right?
>
> Is that required that it returns used value instead of 'auto' for all properties that have 'auto'?

It returns "resolved values", which is the used value for a small set
of properties, and the computed value otherwise.

Computed values are evaluated as far as possible based solely on the
value of other properties in the document, without relying on layout
information.  'flex-item-align:auto' can be resolved based solely on
the value of 'flex-align' on the parent, so it should be resolved at
computed-value time.

~TJ
Received on Friday, 27 January 2012 01:27:25 GMT

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