flobacher / SVGInjector2

Fast, caching, dynamic inline SVG DOM injection library
MIT License
57 stars 8 forks source link

prefix CSS URL-property with SVG-filename for Firefox #6

Open flobacher opened 7 years ago

flobacher commented 7 years ago

Check if external stylesheet contains a styledef with an URL e.g.:

.className{
    fill: url(#bg-arrow--gradient-yellow-linear-gradient-1);
}

Since this is most likely from the injected svg make sure to not suffix the definition when injecting it, inject it only once for all browsers except firefox. Firefox only needs an absolute URL, so best is to use the svg-filename or the one of the spritesheet...