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

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 UTC