New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
preserveAspectRatio #18
Comments
Right now no :( You can try to play with my still (!!) unfinished branch: https://github.com/Hiswe/gulp-svg-symbols/tree/svgo-removal that doesn't use SVGO :) It seems to have fixed some problems like in #6 |
@stephanedemotte this plugin no longer use SVGO. Everything should be preserved! |
great thanks ! |
@stephanedemotte you're welcome :) |
Hey, I also want to keep the preserveAspectRatio attribute of the original svg. |
@am3000 it should be possible to do this with a custom templates with a custom transformdata function. the |
@am3000 a template could look like that <svg xmlns="http://www.w3.org/2000/svg" style="width:0; height:0; visibility:hidden;"><% if(defs) {%>
<defs>
<%= defs %>
</defs><% } %><% _.forEach( icons, function( icon ){ %>
<symbol id="<%= icon.id %>" viewBox="<%= icon.svg.viewBox %>"<% if (icon.svg.originalAttributes.preserveAspectRatio) {%> preserveAspectRatio="<%= icon.svg.originalAttributes.preserveAspectRatio %>" <% }%>><% if (icon.title) {%>
<title><%= icon.title %></title><% }%>
<%= icon.svg.content %>
</symbol><%
}); %></svg> But I think I will port it to the default template |
Hi,
Thanks for your great plugin !
Small question, how i can keep the preserveAspectRatio="none" attribute ?
I try with svgo :
But i can't keep this value.
Any idea ?
The text was updated successfully, but these errors were encountered: