You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
prefixize.js seeks to adjust names of styles that use url(#myNameHere) to the appropriate generated ID. However, this fails for one of our use cases that has a linearGradient in a SVG def attribute.
Here is an example SVG image on codepen: http://codepen.io/troutr/pen/VaKMMR
Note the style named .simpleClass uses a fill to #simpleGradient.
<defs><style>
.simpleClass {
fill: url(#simpleGradient); /*This should get updated to a new name...??*/
}
.company-fill {
fill: #18a7e0;
}
</style><linearGradientid="simpleGradient" x1="5709.17" y1="20.01" x2="5724.1" y2="34.94" gradientUnits="userSpaceOnUse"><stopoffset="0" stop-color="#003952" />
...etc etc
<stopoffset="0.99" stop-color="#003952" />
</linearGradient></defs>
Note the gradient fill on the bottom half of the SVG image.
Running this SVG through prefixize: true produces the following results:
This results in the following image:
I noticed that fill: url(#simpleGradient); is not updated to fill: url(#CompanyIcon_778e02c09f8a5ed0e12a9f654379ecbe_simpleGradient);.
The text was updated successfully, but these errors were encountered:
I am running
svg-sprite-loader@0.0.17
.prefixize.js
seeks to adjust names of styles that useurl(#myNameHere)
to the appropriate generated ID. However, this fails for one of our use cases that has alinearGradient
in a SVGdef
attribute.Here is an example SVG image on codepen: http://codepen.io/troutr/pen/VaKMMR
Note the
style
named.simpleClass
uses a fill to#simpleGradient
.Note the gradient fill on the bottom half of the SVG image.
Running this SVG through
prefixize: true
produces the following results:This results in the following image:
I noticed that
fill: url(#simpleGradient);
is not updated tofill: url(#CompanyIcon_778e02c09f8a5ed0e12a9f654379ecbe_simpleGradient);
.The text was updated successfully, but these errors were encountered: