W3C home > Mailing lists > Public > www-style@w3.org > November 2011

Re: [css3-flexbox] width:flex() in DOM

From: Tony Chang <tony@chromium.org>
Date: Tue, 8 Nov 2011 10:37:07 -0800
Message-ID: <CAL-=4P0Xu+uJCz_rCh96vuScbS3Rez8MJpaEtZFC_zhEa11QBg@mail.gmail.com>
To: "Tab Atkins Jr." <jackalmage@gmail.com>
Cc: Alex Mogilevsky <alexmog@microsoft.com>, "www-style@w3.org list" <www-style@w3.org>
On Mon, Nov 7, 2011 at 6:00 PM, Tab Atkins Jr. <jackalmage@gmail.com> wrote:

> On Mon, Nov 7, 2011 at 5:27 PM, Alex Mogilevsky <alexmog@microsoft.com>
> wrote:
> > How should be flexible width exposed in DOM, in particular in existing
> APIs?
> >
> > I think I have the answer, just want to check:
> >
> > If something has “width:flex(1)”,
> >
> > element.style.width returns the specified value – “flex(1)” or “flex(1 0
> > auto)” (should be ok to expand the defaults).
>

Note that the default preferred width is 0 so in your example flex(1) is
equivalent to flex(1 0 0).



> > getComputedStyle() returns used value (pixels), after any flexibility has
> > done its damage.
> >
> > element.offsetWidth returns pixels as well
> >
> > Right?
>
> Yes, all of these fall out of the definition of specified values and
> used values.
>
> ~TJ
>
>
Received on Tuesday, 8 November 2011 18:37:35 GMT

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