RE: [css3-images] exactly 2 adjacent colors stops

> From: Tab Atkins Jr. [mailto:jackalmage@gmail.com]
> 
> On Tue, May 24, 2011 at 6:33 AM, Alan Gresley <alan@css-class.com>
> wrote:
> > From an author perspective a repeating-linear-gradient that repeats
> over
> > it's own tile can give some extraordinary results. My question is,
> should it
> > be happening in the first place? If it should, examples are needed in
> the
> > draft spec.
> 
> I agree that the behavior of a repeating-linear-gradient when the
> first color-stop is not at 0 can be slightly surprising at first, but
> as soon as you grasp how it works, it's simple and easy.

From the authoring perspective, that's one point of view.  The words "simple and easy" are not what I would use; "tractable and acceptable for the non-casual author" I would agree with.

From an implementation perspective there is a cost though.  I don't know what it is like for other graphics libraries (and didn't go looking), but for D2D the CSS concept doesn't map directly.  The consequence of the CSS approach is that the mapping to D2D is more complex for CSS repeating gradients that start away from 0 than for those that start at 0.

I'm less worried about the performance impact of this, than I am about the author limitation aspect.  Essentially you end up cutting your maximum stop count in half to do the mapping.

Received on Tuesday, 24 May 2011 17:38:10 UTC