Skip to content

Instantly share code, notes, and snippets.

@basecode
Created March 16, 2012 20:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save basecode/2052614 to your computer and use it in GitHub Desktop.
Save basecode/2052614 to your computer and use it in GitHub Desktop.
Webkit SVG Bugs: <use> + <filter>
<svg style="border:1px solid #000;" width="240" height="200">
<defs>
<symbol id="imageRef">
<image xlink:href="http://www.howtocleanstuff.net/wp-content/uploads/boat.jpg" width="100%" height="100%" />
</symbol>
<filter id="filterRef" height="10" width="10" x="-5" y="-5">
<feGaussianBlur stdDeviation="1"></feGaussianBlur>
</filter>
</defs>
<!-- reuse image reference and apply a blur filter //-->
<use xlink:href="#imageRef" filter="url(#filterRef)" width="200" height="200" />
</svg>
<svg style="border:1px solid #000;" width="240" height="200">
<defs>
<symbol id="imageRef">
<image xlink:href="http://www.howtocleanstuff.net/wp-content/uploads/boat.jpg" width="100%" height="100%" />
</symbol>
<filter id="filterRef" height="10" width="10" x="-5" y="-5">
<feGaussianBlur stdDeviation="1"></feGaussianBlur>
</filter>
</defs>
<!-- wrap use element by a group-element //-->
<g filter="url(#filterRef)">
<use xlink:href="#imageRef" x="20" y="0" width="200" height="200" />
</g>
</svg>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment