accurat / accurapp

Create JS apps with flexible build configuration, tailored for the specific needs of Accurat
MIT License
21 stars 5 forks source link

SVG IDs are not prefixed for *.color.svg files #64

Open caesarsol opened 4 years ago

caesarsol commented 4 years ago

Steps to reproduce

Actual behavior

The two IDs clashes, because they are note rewritten, and the second clipPath does not work.

Expected behavior

The IDs should be renamed and prefixed (with filenames). Easy to do just removing this line: https://github.com/accurat/accurapp/blob/0a69c5dfe9b163abbd3b23db6a6015f7a3167acc/packages/webpack-preset-accurapp/customBlocks.js#L193

@marcofugaro do you remember why for *.color.svg the IDs are not prefixed?

marcofugaro commented 4 years ago

do you remember why for *.color.svg the IDs are not prefixed?

No idea 😂

Have you tried doing a test with the styles relative to the ID? For example

<style>
#id { fill: red }
</style>
<path id="id" d="...">

Does it work as well and keeps the styles?