Re: [css-images][filter-effects] interpolation of filter() to url()/image()

On Tue, Sep 3, 2013 at 11:52 PM, Dirk Schulze <dschulze@adobe.com> wrote:
> Hi,
>
> I had a discussion on IRC about interpolating from a CSS Image filter() function to a normal image reference and the other way around. It was suggested that authors may not want to use filter() at start and end of a transition to have a interpolation of filter functions. At least if the input image on filter() is the same as the image at the end of the transition.
>
> @keyframes filter {
>   0% {
>     background-image: filter(url(image.png), grayscale(100%));
>   }
>   100% {
>     background-image: url(image.png);
>   }
> }
>
> The request was that the function above does not do a cross-fade from one image to the other but interpolate the grayscale filter function instead. Just as if the author would have specified filter(url(image.png), grayscale(0)).
>
> Note that this request is just for interpolating from and to the same image source.
>
> The question is if we should just special case filter() or other image functions as well it we think this is useful. And to which extend to we want to support it?

Because filter() has useful "do nothing" defaults, I think this is
reasonable.  We'll have to start being careful about precedence if we
start doing this, though - if we ever add a second function which
makes sense to do this for, we'll need to define how to decide which
should be magicked up (or, if both should be, which is the "outer"
function).

~TJ

Received on Wednesday, 4 September 2013 14:54:53 UTC