CSS gradient runs from center to side . SVG gradient runs from center to corner . Thus, the radius of the SVG gradient is 1.414 (â2) times larger than the radius of the CSS gradient.
I did not find a way to make the SVG gradient the size from the side instead of the corner. Therefore, to combine CSS gradient stop with 50%, I calculated SVG gradient stop manually:
(CSS gradient radius / SVG gradient radius / 2) or (1 / 1.414 / 2) .
This means: <stop offset="0.3536" stop-color="#00f"/>
http://codepen.io/anon/pen/emLqy/
... In Google Chrome, there is still a slight difference (presumably no dithering ) in how the gradients are displayed. In Firefox and Safari, both gradients look smooth.
SE
source share