I have an page with an interactive SVG which looks fine on all browsers (Firefox, Chrome, even IE/Edge) except Safari where everything affected by one of the SVG filters turns into a fuzzy mush (looks like something rendered onto a low-resolution canvas which got scaled up using bilinear interpolation).
Here now a small test case where the problem also appears:
<svg>
<defs>
<filter id="filter" y="-100" x="-100" height="300" width="300">
<feGaussianBlur in="SourceAlpha" stdDeviation="3.5"></feGaussianBlur>
<feColorMatrix type="matrix" values="0 0 0 2 0 0 0 0 2 0 0 0 0 0 0 0 0 0 1 0" result="lightenedBlur"></feColorMatrix>
<feMerge>
<feMergeNode in="lightenedBlur"></feMergeNode>
<feMergeNode in="SourceGraphic"></feMergeNode>
</feMerge>
</filter>
</defs>
<g>
<rect x="10" y="10" width="100" height="100" fill="blue" filter="url(#filter)"></rect>
</g>
</svg>
How it looks on Apple Safari 11 (on OS X 10.13):
Compare that to Google Chrome and Mozilla Firefox respectively:
When looking at other SVG filter demo pages on the web though the effect apparently isn't there. Not quite sure what exactly causes it. What I noticed is that the issue becomes more apparent the larger the filter area is (controlled through the width
/height
attributes of <filter>
).
Is this a known issue? Under what circumstances does it occur? What are reasonable workarounds?