Re: [css3-transitions] Interpolating between values from different information sources

On Nov 1, 2010, at 5:43 PM, Brad Kemper wrote:

> On Nov 1, 2010, at 4:10 PM, "Tab Atkins Jr." <jackalmage@gmail.com> wrote:
> 
>> The specific idea I came up with lets us address both of those in a
>> consistent way together, such that you can always interpolate between
>> the two.  You can't do that with an explicit switch between two
>> different behaviors.
> 
> In theory, you could. In transitioning from a fixed angle to a corner-to-corner angle, for instance, you just keep rotating the angle until it stretches from one corner to the other, and for the very last step, switch to the keyword version with the angle converted (for the reverse animation, do the conversion as the very first step).  For any 'as-square' angle in my syntax, there would be an equivalent non-stretchy angle. The numbers would jump at the beginning or end, due to the conversion, but for any step along the way, there would be a simple answer to the question of what the angle is. The keyword is there to handle different sized rectangles, but there is still a simple-angle equivalent for any box involved. It might even be handy to know what that angle is through the CSSOM when not transitioning.

Or, to put it another way:

The computed value would always be a simple angle, with no keyword. The "as-square" keyword would only be used in the specified value to determine what angle to use for the direction of the gradient when first drawing the rectangle (or when redrawing the rectangle at a different size). But when getting the computed value, the angle would be the actual angle, and interpolation is very simple.

Received on Monday, 8 November 2010 15:50:46 UTC