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

Re: [css3-flexbox] "<flex> can also transition to and from a <length>"

From: Daniel Holbert <dholbert@mozilla.com>
Date: Fri, 06 Apr 2012 16:53:37 -0700
Message-ID: <4F7F8201.2090805@mozilla.com>
To: "Tab Atkins Jr." <jackalmage@gmail.com>
CC: www-style list <www-style@w3.org>
Hmm... So on further reflection, I realized that it's problematic for
transitions to depend on whether or not we're a flexbox item.

The definition of "flexbox item" depends partly on what the underlying
element is -- e.g. <img> & <embed> vs <span> & <i>.

Transitions, however, happen in the style system, so they don't have
access to what the underlying element is. (at least, they don't in Gecko)

For example: Suppose we've got "flex:1 0 auto" on both an <img> and a
<span> inside a flexbox, and then we tweak that to "flex: 10px". The
spec currently says that the <img> should transition this change,
whereas the <span> shouldn't -- however, we have no way to figure that
out from inside the style system.  (Of course, even if we transitioned
the span, it wouldn't have a visible effect since 'flex' is going to be
ignored -- still, the intermediate values of 'flex' would be exposed via
the computed style of the 'flex' property.)

I think the simplest way to resolve this is just to change "flexbox
item" to "child of a flexbox" here:
> The ‘flex’ property is transitionable if the element is a flexbox item

Thoughts? Does this make sense?

Received on Friday, 6 April 2012 23:54:06 UTC

This archive was generated by hypermail 2.4.0 : Friday, 25 March 2022 10:08:14 UTC