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

Re: animate/transition height to/from auto

From: Rik Cabanier <cabanier@gmail.com>
Date: Tue, 13 Nov 2012 15:41:33 -0800
Message-ID: <CAGN7qDA0tOi_dLtN3fkjUwfM-rtnzirzWoeCPovsqNsLPuutfQ@mail.gmail.com>
To: "Tab Atkins Jr." <jackalmage@gmail.com>
Cc: Behrang Saeedzadeh <behrangsa@gmail.com>, W3C CSS Mailing List <www-style@w3.org>
On Tue, Nov 13, 2012 at 11:42 AM, Tab Atkins Jr. <jackalmage@gmail.com>wrote:

> On Thu, Nov 8, 2012 at 4:46 PM, Behrang Saeedzadeh <behrangsa@gmail.com>
> wrote:
> > Any plans to add this to the CSS spec? Right now, even with JS, it is not
> > possible to do this elegantly.
>
> Yes, it's a major lack in Transitions right now.  It's not easy to
> fix, though - Transitions currently fire only when the computed value
> changes, while 'auto' is translated into a length at used-value time.
>

Can you elaborate?
'auto' becomes a value in the computed style so it should be possible to
transition from that value.
>From the CSS transtions spec:

The computed value of a property transitions over time from the old value
to the new value.



>
> It may be possible to special-case width/height, without too much
> trouble, so that transitions to/from auto work as expected.  However,
> this won't allow you to, say, transition the height of an element
> which is 'auto' the entire time, but changes due to a child changing
> height.
>
> ~TJ
>
>
Received on Tuesday, 13 November 2012 23:42:00 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 17:21:02 GMT