W3C home > Mailing lists > Public > www-style@w3.org > February 2009

Re: Comments on CSS Transitions

From: David Hyatt <hyatt@apple.com>
Date: Fri, 27 Feb 2009 11:52:41 -0600
Cc: "Tab Atkins Jr." <jackalmage@gmail.com>, www-style@w3.org, www-svg@w3.org
Message-id: <8C289FC6-CB6E-44BE-9B95-E740C969E271@apple.com>
To: Boris Zbarsky <bzbarsky@MIT.EDU>

On Feb 27, 2009, at 11:04 AM, Boris Zbarsky wrote:

> Tab Atkins Jr. wrote:
>> It seems clear that transitions are triggered whenever the specified
>> value changes, whether through direct manipulation or through the
>> cascade.
>
> It does?  The last time I looked into this it sounded to me like a
> transition is triggered whenever the _computed_ value of a property
> should change, and that this change should happen in increments.
> Computed value changes due to a transition should be ignored during  
> this
> process.

This is right.  In WebKit, we transition on the computed value of a  
property (not the specified value or used value).  Note that there  
have been requests to transition on the used value instead, the most  
obvious example being wanting to transition from, e.g., width:100% to  
width:50px.   If you transition on the computed value, then it's  
impossible to run an animation from width:auto to width:50px or from  
width:50% to width:80px, etc.

The problem with transitioning on the used value, though, is it can  
change when your style hasn't.... if you resize a window that contains  
a width:auto or width:100% block for example.  Obviously you don't  
want to run a transition in that case.

My own preference would be (for simplicity) to just stick with  
transitioning on the computed value and to just say "Tough" to people  
who want to animate width this way, but maybe others disagree.  We  
continue to get bugs in WebKit from confused people trying to animate  
auto widths to fixed values (or percents to fixed values) and not  
understanding why it doesn't work.

dave
(hyatt@apple.com)
Received on Friday, 27 February 2009 17:54:26 GMT

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