W3C home > Mailing lists > Public > www-style@w3.org > May 2012

[css3-images] interpolation of color stop positions (was Re: Change to currentColor means it's no longer animatable?)

From: L. David Baron <dbaron@dbaron.org>
Date: Mon, 30 Apr 2012 22:36:35 -0400
To: Shane Stephens <shans@google.com>
Cc: "Tab Atkins Jr." <jackalmage@gmail.com>, www-style list <www-style@w3.org>
Message-ID: <20120501023635.GA13412@crum.dbaron.org>
On Tuesday 2012-05-01 10:25 +1000, Shane Stephens wrote:
> When we discussed this issue last August (
> http://web.archiveorange.com/archive/v/OOYmTrbeuqHBxqIvwMab) the consensus
> seemed to be that  both bumping of overlapping stops and placement of
> auto-positioned stops occurs before interpolation. You can't bump
> overlapping stops until layout time.

Why?  I really don't think interpolation should depend on layout,
and I don't see what the use case for breaking that principle here
is.

-David

> 
> so for the following example at a width of 100px:
> 
> linear-gradient(red 100px, green 50%);
> to
> linear-gradient(red 20px, green 50%);
> 
> consensus was that we first resolve to
> linear-gradient(red 100px, green 100px);
> to
> linear-gradient(red 20px, green 50px);
> (i.e. at 50% interpolation we'd have linear-gradient(red 60px, green 75px))
> 
> rather than first interpolate, then resolve.
> (i.e. at 50% interpolation we'd have linear-gradient(red 60px, green 50%),
> which would resolve to linear-gradient(red 60px, green 60px))

> On Tue, May 1, 2012 at 9:03 AM, L. David Baron <dbaron@dbaron.org> wrote:
> > I don't think so.  Gradient stop positions that are mixes of lengths
> > and percents can be represented using calc(), and thus done entirely
> > at the computed value stage.

-- 
𝄞   L. David Baron                         http://dbaron.org/   𝄂
𝄢   Mozilla                           http://www.mozilla.org/   𝄂
Received on Tuesday, 1 May 2012 02:37:03 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 17:20:53 GMT