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: Fri, 23 Nov 2012 19:33:01 -0800
Message-ID: <CAGN7qDA5S6N=oDy_85OOpf=Fnhtc3E=EYKp9ofKeP0akKnjk4Q@mail.gmail.com>
To: Boris Zbarsky <bzbarsky@mit.edu>
Cc: www-style@w3.org
On Fri, Nov 23, 2012 at 7:25 PM, Boris Zbarsky <bzbarsky@mit.edu> wrote:

> On 11/23/12 7:10 PM, Rik Cabanier wrote:
>
>> I think the transition should happen with computed values.
>>
>
> Note that the computed height of the outermost div is never "100px".


I guess it depends. In Chrome (WebKit?) the computed style inspector says
'100px'

The spec says (1):

*Computed value:*  the percentage or 'auto' (see prose under
<percentage><http://www.w3.org/TR/CSS21/syndata.html#value-def-percentage>)
or the absolute length



> What you really seem to want is that in some cases the computed value be
> converted to a used value (in a way the spec will need to define!  For
> example, which exact transitions should and should not be taken into
> account during that process?) and the transition effectively happen on used
> values.
>
>
>  So, at 50% the height of 'outer' is 50px, so 'middle' should be '25px'.
>>
>> When the transition is over, 'middle' will jump to become 100px.
>>
>
> This seems .. very undesirable to me.
>
> In particular, I suspect it will cause such transitions to be serious
> footguns.


I don't believe it is possible to implement the desired behavior for this
particular case. There are going to be many edge cases and possible
recursion problems that will be very hard to crack.
A simply rule (= used the computed value) is much easier to understand and
can give the desired effect.

1: http://www.w3.org/TR/CSS21/visudet.html#the-height-property
Received on Saturday, 24 November 2012 03:33:28 GMT

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