Re: [css3-transitions] Repeating background-positions

On Tuesday 2011-11-29 23:28 +0100, Rune Lillesveen wrote:
> From the current CSS3 Transitions ED:
> 
> "list of above types: If the lists have the same number of items,
> each item in the list is interpolated using the rules above.
> Otherwise the interpolation is determined by the property rules. If
> the property extends its list by repeating values, then this
> repeated form will be used in the interpolation
> (‘background-position’ in an example of a property that would
> transition between lists of different lengths). If the property does
> not allow extending its list, then no interpolation will occur."

Hmmm.  That wording seems new since I last looked at that part, and
also wrong:  it's fine for the properties that don't determine the
number of things (unless somebody looks at computed style and sees
what's actually happening underneath), but it's very bad for the
properties that do determine the count (e.g., background-image,
transition-property, animation-name).  I'm not sure how to deal with
that, and we will need to once image types are interpolable.

> That means that if you transition background-position from a list of
> 7 positions to a list of 11 positions you actually need 77 different
> background positions for the computed style while transitioning
> (unless my math fails me). Repetition of transitions will happen at
> the product of the lengths of the two lists divided by the lengths'
> gcd.

That seems correct given your interpretation of the spec.

(Gecko implements that interpolation strategy only for
stroke-dasharray.)

> Is that a correct interpretation of the spec?

If it is, I'd certainly rather the spec be more explicit about it.

-David

-- 
𝄞   L. David Baron                         http://dbaron.org/   𝄂
𝄢   Mozilla                           http://www.mozilla.org/   𝄂

Received on Tuesday, 29 November 2011 22:41:17 UTC