Re: [css3-transitions] interpolation between value types

On Tuesday 2011-11-08 22:37 +0000, Jennifer Yu wrote:
> While
> http://dev.w3.org/csswg/css3-transitions/#animation-of-property-types-
> describes how each property type undergoes a transition, it
> doesn't define how interpolation should occur between value types.
> eg. between a percentage and a length.

In the general case, it's not possible to interpolate between
arbitrary value types.  In such cases, there's no
transition/animation.

In the particular case of lengths and percentages (for most
properties), and maybe in the future for some other cases, I think
interpolation can use calc().  This is what I've implemented in
Gecko.  For example, 25% of the way from 50% to 200px is calc(0.75
* 50% + 0.25 * 200px).

-David

-- 
𝄞   L. David Baron                         http://dbaron.org/   𝄂
𝄢   Mozilla                           http://www.mozilla.org/   𝄂

Received on Tuesday, 8 November 2011 22:54:52 UTC