RE: [css3-images] comments on radial gradients

http://dev.w3.org/csswg/css3-images/#radial-color-stops (4.2.2, Placing Color Stops) says:
  # [1] Negative locations can be specified; [2] though negative locations
  # are never directly consulted for rendering, [3] they can affect the
  # color of non-negative locations on the gradient ray through
  # interpolation. For example, ‘radial-gradient(red -50px, yellow
  # 100px)’ produces an elliptical gradient that starts with a
  # reddish-orange color in the center (specifically, #f50) and
  # transitions to yellow.

On Wed, Mar 14, 2012 at 1:53 PM, Brian Manthos <brianman@microsoft.com> wrote:
> Heck, even in non-repeating gradients it's a concern:
[A]
>        radial-gradient(red -25px, blue -20px, green -15px);

Tab:
> I don't understand why this is a concern.  Could you explain in more detail what
> is wrong with the spec text such that it causes your example to be misinterpreted?


[1] [A] is a valid declaration.
[2] All three locations in [A] "are never directly consulted for rendering".
[3] No impact on [A] as there are no non-negative locations.

So [A] is a valid declaration but none of the stops are ever consulted for rendering, nor are there any additional stops that they affect.

So ... does that imply you render transparent since there are stops consulted for rendering?


IMO, the desired behavior is to solid fill green but the spec leaves it open for an implementation to render nothing / transparent without being non-conformant.


You could add text like "for non-repeating gradients, if all locations are negative there is an implied stop at 0% that has color matching the last specified stop" to address the problem.  I don't like that approach necessarily, but it would be solution to the concern for the non-repeating case.

Received on Wednesday, 14 March 2012 22:57:32 UTC