W3C home > Mailing lists > Public > www-style@w3.org > November 2011

RE: [css3-transitions] interpolation between value types

From: Jennifer Yu <Jennifer.Yu@microsoft.com>
Date: Tue, 8 Nov 2011 22:58:20 +0000
To: Tab Atkins Jr. <jackalmage@gmail.com>
CC: "www-style@w3.org" <www-style@w3.org>
Message-ID: <7EA00A307FAE3841A1E43869EF9D3BA92337CC@TK5EX14MBXC284.redmond.corp.microsoft.com>
Thanks for the clarification. That's what I would have expected. It's also what Gecko does as David points out, though I believe Webkit doesn’t apply a transition.

-----Original Message-----
From: Tab Atkins Jr. [mailto:jackalmage@gmail.com] 
Sent: Tuesday, November 08, 2011 2:53 PM
To: Jennifer Yu
Cc: www-style@w3.org
Subject: Re: [css3-transitions] interpolation between value types

On Tue, Nov 8, 2011 at 2:37 PM, Jennifer Yu <Jennifer.Yu@microsoft.com> wrote:
> While 
> http://dev.w3.org/csswg/css3-transitions/#animation-of-property-types-

> describes how each property type undergoes a transition, it doesn’t 
> define how interpolation should occur between value types. eg. between 
> a percentage and a length.
> I would imagine that you’d compute a length from the percentage, then 
> interpolate over the lengths. But this is a little more complicated in 
> the case of background-position, for instance. If you have:
> {
> background-image: url('1.gif'), url('2.gif'), url('3.gif');
>                 background-size: 100px 100px, 200px 200px, 300px 
> 300px;
>                 background-position: 50%;
>                 transition: background-position 5s;
>                 width: 500px;
>                 height: 500px;
> }
> then set element.style.backgroundPosition=”100px”;
> What does a transition and its corresponding computed value look like 
> in this case?

I believe the intention is to use calc() to represent the intermediate state.

background-position is underdefined in this aspect.


Received on Tuesday, 8 November 2011 23:00:50 UTC

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