Is there a setting which will make Illustrator CS6 to add stroke="none" when object has no stroke? Illustrator preserves only fill="none" by default, and removes any attributes related to stroke when there is no stroke. It is highly undemandable because such generated SVG files have issue when imported to another software i am using. That software seeing no stroke attribute as black with 1px width. For now i am forced to resave all SVGs in Inkscape which preserves stroke attribute, but i don't like this.

  • As far as I know, there's no setting. Why not just add the missing attribute using a text editor? For example: <circle fill="#FF0000" stroke="none" cx="200" cy="200" r="100"/>
    – Billy Kerr
    Dec 8 '19 at 18:27
  • 1
    For one object it wouldn't be a problem, for more objects it will be pain in a$$. I am not really sure which software is at fault here, but there is no important. Nor Adobe will fix this in CS6, and the other developer either.
    – Zygmunt
    Dec 9 '19 at 17:55
  • I think you could automate it using the find and replace functionality in a decent text editor. For example, search for <circle and replace with <circle stroke="none", or for each <path, replace with <path stroke="none", etc.
    – Billy Kerr
    Dec 9 '19 at 18:08
  • No, it won't work. You would need to create either good regexp (quite complicated to say) to get all possible cases and verify if stroke attribute is added or not. I didn't say that all objects have no stroke - some of them have stroke. This way doing it with Inkscape is more proper way.
    – Zygmunt
    Dec 10 '19 at 11:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.