[css3-images] too-small repeating gradients

Tab:
> 1. Changed the handling of too-small repeating gradients to render as the average color.

http://dev.w3.org/csswg/css3-images/#color-stop-syntax


The 8/2 version has two descriptions:

(A)
repeating-linear-gradient(red 5px, white 5px, blue 5px);
# If the distance between the first and last color-stops is zero,
# the gradient must be rendered as a solid-color image equal
# to the "average" color of the gradient, determined by linearly
# blending the colors of all the color-stops in premultipied sRGBA space.

(B)
repeating-linear-gradient(red 5px, white, blue 5.00000000000000000000000000000000000000000000000000000000000001px);
(Algorithm described)


I believe that...

For case (A) the expected result is equal contributions from red, white, and blue.
For case (B), the expected result is 25% red, 50% white, and 25% blue contributions.

If this is correct, there is a discontinuity between (A) and (B).

Questions:
(1) Is my interpretation of the language incorrect?
(2) If no to (1), I prefer (B) and suggest an adjustment to the language for case (A) so that it produces the same result as case (B).


[Minor note courtesy of spell-checker: "premultipied" is missing the second L in the spec phrasing for case A.]

Received on Wednesday, 3 August 2011 23:21:01 UTC