Re: [css3-transitions] Interpolating images

On Tue, Nov 30, 2010 at 2:26 PM, David Singer <singer@apple.com> wrote:
> Um, wouldn't it work by deciding what the appearance would be for the initial image, and what the appearance would be for the final image (and this decides all the scaling, cropping, replicating, etc. that might occur), and then the transition would happen between those two appearances?  We shouldn't have to make 'new' decisions about scaling etc., should we?

That's equivalent to my second option.

It produces additional problems, which I hinted at.  Namely, CSS
requires that an image have a well-defined size at all times, so that
the image can properly interact with background-position,
background-size, background-repeat, etc.  Just treating each as an
infinite layer and fading between the two doesn't play nicely with
that.

To be a little more specific, your suggestion (and my option 2) is
attacking the problem at the wrong level.  You can use that approach
to transition between two fully-instantiated background layers, but
not the actual <image>s that are used to create the layer.  The former
doesn't exist in a way that Transitions can target; you have to attack
the problem at the level of the latter.

I also suspect that doing this would be fairly ugly in common cases.


> And should there be some way to suggest that the transition is other than a crossfade?

Eventually, yes, there should be, just as there should be a way to
suggest that color transitions happen in hsl space rather than rgb.
But I'm willing to punt that until Transitions 4 - it can be
accommodated through a "transition-strategy" property or something.

For now, crossfade seems to be a clearly acceptable option for most
cases, so I'm okay with specifying it as the only option right now.
(Well, second option - you can always transition abruptly using
steps.)

~TJ

Received on Tuesday, 30 November 2010 22:46:16 UTC