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

RE: [css3-images] comments on radial gradients

From: Brian Manthos <brianman@microsoft.com>
Date: Wed, 14 Mar 2012 22:56:58 +0000
To: Tab Atkins Jr. <jackalmage@gmail.com>
CC: "L. David Baron" <dbaron@dbaron.org>, "www-style@w3.org" <www-style@w3.org>
Message-ID: <9710FCC2E88860489239BE0308AC5D1712913D3A@TK5EX14MBXC266.redmond.corp.microsoft.com>
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 GMT

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