[svgwg] Define behaviour of `<stop>` if `offset` value not specified.

BigBadaboom has just created a new issue for 
https://github.com/w3c/svgwg:

== Define behaviour of `<stop>` if `offset` value not specified. ==
A user of my rendering library has just discovered a bug triggered by 
an SVG file which has gradients defined with a missing `offset` value 
on the first stop elements.

    <stop stop-color="#288549"/>

While checking the correct behaviour, I was surprised to discover that
 neither SVG 1.1 not SVG 2 have anything to say about what the initial
 value of `offset` should be if it is not specified. 

>From testing it seems that all browsers treat a missing offset as 0 
(0%), rather than an error. But I suggest making that explicit in the 
definition, by changing the first bullet point in section 13.3.5.3 to 
read:

> Gradient offset values less than 0 (or less than 0%) are rounded up 
to 0%. Gradient offset values greater than 1 (or greater than 100%) 
are rounded down to 100%.  If offset is not specified, the effect is 
as if a value of '0%' were specified.



Please view or discuss this issue at 
https://github.com/w3c/svgwg/issues/217 using your GitHub account

Received on Tuesday, 26 July 2016 09:47:06 UTC