W3C home > Mailing lists > Public > www-style@w3.org > February 2013

Re: [css3-transitions] Transitions and multiple backgrounds

From: Simon Fraser <smfr@me.com>
Date: Mon, 04 Feb 2013 10:06:55 -0700
Cc: Dean Jackson <dino@apple.com>, Sylvain Galineau <sylvaing@microsoft.com>, "www-style@w3.org" <www-style@w3.org>, Brian Manthos <brianman@microsoft.com>, Kevin Babbitt <kbabbitt@microsoft.com>
Message-id: <729BDEF9-2D77-4168-A4E7-88E8FE939C09@me.com>
To: "L. David Baron" <dbaron@dbaron.org>
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.

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").

> But for the properties whose values get
> repeated to match the length of the background-image list, we
> shouldn't require matched lengths.
> Then there's the question of what the computed value should be
> during the animation.  I think, however, there's a relatively simple
> solution, which I implemented in Gecko for animation of
> stroke-dasharray.
> We should define two animation concepts, "list" and "repeatable
> list".
> A "list" is the current definition; to interpolate, the lengths of
> both lists must match.
> A "repeatable list" yields an interpolation result whose length is
> the least common multiple (lcm) of the lengths of the two input
> lists.  Both input lists are repeated to that length, and then
> interpolation is value-by-value on the items in that full list.
> We can then define all the background-* list properties except for
> background-image, and stroke-dasharray, to be a repeatable list.

Sounds like a nice approach.

Received on Monday, 4 February 2013 17:07:27 UTC

This archive was generated by hypermail 2.4.0 : Friday, 25 March 2022 10:08:26 UTC