W3C home > Mailing lists > Public > www-style@w3.org > April 2013

[css-images] Repeating radial gradient with (near-)zero height

From: Simon Sapin <simon.sapin@exyr.org>
Date: Fri, 05 Apr 2013 15:48:34 +0200
Message-ID: <515ED632.4080302@exyr.org>
To: "www-style@w3.org" <www-style@w3.org>
Hi,

4.3 has:

> If the height of a repeating radial gradient is zero, or is close
> enough to zero that the implementation knows that the physical
> resolution of the output device is insufficient to faithfully render
> the gradient, the implementation must find the average color of the
> gradient and render the gradient as a solid-color image equal to the
> average color.

I was wondering what height this is referring to, and why it is more 
relevant than the width. I wrote a whole email asking for clarification 
before I figured it out.

Because the gradient line of radial gradients is always towards the 
right, it is possible that the first and last gradient stops are at big 
enough distance (and thus the previous paragraphs do not apply) but the 
gradient still needs to be averaged to a solid color because a flat (or 
very narrow) ellipse would require it to be repeated too "frequently" in 
the vertical direction.

I suggest rephrasing, and adding a special case when the width is zero:

> If width of the ending shape of a repeating radial gradient is
> non-zero and the height is zero, or is close enough to zero that the
> implementation knows that the physical resolution of the output
> device is insufficient to faithfully render the gradient, the
> implementation must find the average color of the gradient and render
> the gradient as a solid-color image equal to the average color.
>
> Note: The <a href="#degenerate-radials">Degenerate Radial
> Gradients</a> section describes how the ending shape is adjusted when
> its width is zero.


Cheers,
-- 
Simon Sapin
Received on Friday, 5 April 2013 13:49:00 UTC

This archive was generated by hypermail 2.3.1 : Friday, 5 April 2013 13:49:01 UTC