Re: [css3-transitions] Transitions and multiple backgrounds

On Mon, Feb 4, 2013 at 9:06 AM, Simon Fraser <smfr@me.com> wrote:
> On Feb 4, 2013, at 9:47 AM, L. David Baron <dbaron@dbaron.org> wrote:
>> So I think we should require matched lengths for the properties
>> whose lengths matter:  in other words, we should still require
>> matched lengths for background-image.  I have no idea what it would
>> mean to do otherwise.
>
> One option would be to cross-fade() from some kind of transparent image.

cross-fade() addresses this case *explicitly*, actually - if you
simply don't give a second image at all, it'll fade to/from
transparent. <http://dev.w3.org/csswg/css4-images/#cross-fade-function>


> For shadow transitions (box-shadow, text-shadow), WebKit does
> allow transitions between lists of different lengths, synthesizing
> the missing shadows (using shadows with zero radius and spread,
> matching "inset" with the corresponding shadow, and choosing a sensible
> color (possibly "transparent").

Note that, while this *is* specified in Transitions, it's missing the
"inset" clause.  As written, transitions will fail when going from an
inset shadow to "none".

I think, as a general rule, that if we can define a reasonable "null"
value for an entry in the list, we should allow animation between
lists of differing lengths.  We can do so for shadows and anything
with images.

~TJ

Received on Monday, 4 February 2013 23:20:08 UTC