svg-inline-loader icon indicating copy to clipboard operation
svg-inline-loader copied to clipboard

inline styles?

Open stevemao opened this issue 8 years ago • 2 comments
trafficstars

I have a few svgs and they have the same classes .cls-1 and/or .cls-2. They overwrite each other's style. If they could be auto inlined that would be great!

<defs>
  <style>
    .cls-1 {
      fill: #3d5a98;
    }

    .cls-2 {
      fill: #fff;
    }
  </style>
</defs>

stevemao avatar Jul 14 '17 06:07 stevemao

@stevemao You can use the classPrefix option to avoid overwriting styles. See https://github.com/webpack-contrib/svg-inline-loader#classprefix-boolean--string

kinetifex avatar Jul 17 '17 16:07 kinetifex

@kinetifex I'll give it a shot! Looks like it's working. Cheers!

stevemao avatar Jul 17 '17 23:07 stevemao