fnando / svg_optimizer

Some SVG optimization based on Node's SVGO
MIT License
19 stars 6 forks source link

Remove attributes with editor namespace. #4

Closed fnando closed 8 years ago

fnando commented 8 years ago

Since we are removing the editor's namespace from the root element, we should also remove the namespaced attributes. Otherwise we'll end up with things like <g type="MSPage">.

rafaelfranca commented 8 years ago

:+1:

I forgot about this gem, thank you for reminder me :sweat_smile:.

@byroot WDYT about integrating it on sprockets-svg to remove this TODO https://github.com/byroot/sprockets-svg/blob/9cca48ee3e8432b3d9abef2567f0bc8fd5fc7fdb/lib/sprockets/svg/cleaner.rb#L6?

byroot commented 8 years ago

@rafaelfranca I'm all for it. However, any default optimization should be 100% lossless. Dunno if svg_optimizer is by default.

fnando commented 8 years ago

@byroot I never found any inconsistencies in processed SVGs; the optimizations are conservative, I believe.