shakyShane / gulp-svg-sprites

Create SVG sprites or compile to <symbols>
MIT License
334 stars 45 forks source link

Possible to keep opacity? #69

Closed whatadewitt closed 7 years ago

whatadewitt commented 9 years ago

Hi,

Is it possible to keep the paths with opacity 0 from being stripped out? I need to keep them in my SVG spritesheet for animation purposes, but they're being eliminated...

My config is

gulp.task('sprites', function () {
  gulp.src('src/svg/*.svg')
    .pipe(svgSprite({
        cssFile: 'src/sass/base/sprites.scss',
        svg: {
          symbols: 'images/symbols.svg'
        },
        preview: false,
        mode: 'symbols',
        selector: 'icon-%f'
      })
    )
    .pipe(replace(/ fill="#.+?"/g, ''))
    .pipe(gulp.dest('./client')); //client/images
});

Thanks!

--d