M
M
Maxim2017-03-05 08:01:45
Node.js
Maxim, 2017-03-05 08:01:45

How to remove id and defs from svg?

Hello. I use gulp-svgmin and gulp-svgstore to optimize svg and sprite creation. But after the sprite is created, some garbage is created. Can I somehow remove it? And how can I set svg to default display: none; without touching styles. Maybe there is some property. It's just that after I remove it all in the file, a new sprite is created and all this is replaced.
Or maybe you can make the classes named the same as the file itself?
b528567d52434ba1b518b3bf3b08d595.PNG
PS because of these styles in defs I can not change the color through css. Maybe there are some other options?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
K
Konstantin Kitmanov, 2017-03-05
@k12th

Have you looked at svgo options?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question