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

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

From: Brian Manthos <brianman@microsoft.com>
Date: Tue, 24 May 2011 17:37:42 +0000
To: Tab Atkins Jr. <jackalmage@gmail.com>, Alan Gresley <alan@css-class.com>
CC: Philippe Wittenbergh <ph.wittenbergh@l-c-n.com>, www-style list <www-style@w3.org>, Brad Kemper <brad.kemper@gmail.com>
Message-ID: <FA122FEC823D524CB516E4E0374D9DCF1FAFBCD9@TK5EX14MBXC136.redmond.corp.microsoft.com>
> 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

This archive was generated by hypermail 2.3.1 : Monday, 2 May 2016 14:38:46 UTC