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

Re: [css3-images] comments on radial gradients

From: Tab Atkins Jr. <jackalmage@gmail.com>
Date: Wed, 14 Mar 2012 15:52:47 -0700
Message-ID: <CAAWBYDBzH0DUrmXmVWaa-eReApYjZ1npGQ9Sz2jTyUnVE0kFJA@mail.gmail.com>
To: "L. David Baron" <dbaron@dbaron.org>
Cc: www-style@w3.org
On Wed, Mar 14, 2012 at 3:38 PM, L. David Baron <dbaron@dbaron.org> wrote:
> On Wednesday 2012-03-14 15:07 -0700, Tab Atkins Jr. wrote:
>> > In section 4.3 (Repeating gradients),
>> > http://dev.w3.org/csswg/css3-images/#repeating-gradients :
>> >
>> >  I think this section ought to be clearer about how negative color
>> >  stops are handled for repeating radial gradients.  The rules for
>> >  repeating in this section seem to contradict the earlier statement
>> >  that positions less than 0 have no effect on rendering in radial
>> >  gradients, since direct application of the repeating rules seems
>> >  to make them take up space and render.
>>
>> Why isn't this handled by the existing text?  "When rendered, however,
>> the color-stops are repeated infinitely in both directions, with their
>> positions shifted by multiples of the difference between the last
>> specified color-stop's position and the first specified color-stop's
>> position."
>
> I can't even tell from that which behavior you're saying happens.
> Given:
>
>  background: repeating-radial-gradient(red -50%, green 0%, blue 100%)
>
> Does the red->green part show up or not?  The radial gradients
> section explicitly says that it doesn't, and the repeating gradients
> section explicitly says that it does.

I suspect the problem is in my wording, where it's potentially
ambiguous whether I'm referring to "the location of a color-stop" or
"a location on the gradient line".

The "negative locations aren't rendered" thing is referring to the
latter.  Color-stops themselves aren't things to be rendered; all they
do is affect the color of the gradient line, which is then used for
rendering.

In the radial-gradient section, I've made the following change to try
to make this clearer:

Old
> Negative locations can be specified; though negative locations are never directly consulted for rendering, they can affect the color of non-negative locations on the gradient ray through interpolation.

New
# A color-stop can be placed at a negative location; though the
negative region of the <i>gradient ray</i> is never directly consulted
for rendering, color stops placed there can affect the color of
non-negative locations on the <i>gradient ray</i> through
interpolation.

Does this help?  Hopefully it's now clear that the "not consulted for
rendering" bit is exclusively talking about the gradient line, not the
color-stops.

~TJ
Received on Wednesday, 14 March 2012 22:53:35 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 22 May 2012 03:48:51 GMT