Answer the question
In order to leave comments, you need to log in
How to solve the problem with negative viewBox values in svg?
I'm making an svg sprite using the gulp-svg-sprites plugin .
Here is the task to create the sprite:
gulp.task('svg-sprite', function (cb) {
return gulp.src('src/images/svg-separate/**/*.svg')
.pipe(svgSprite({
mode: "symbols",
// preview: false,
selector: "svg-%f",
svg: {
symbols: 'svg_sprite.pug'
}
}
))
.pipe(gulp.dest('src/pug/partails/'))
});
Answer the question
In order to leave comments, you need to log in
Re-save the svg so that everything is zero-based. It happens that yes, when you save from a chandelier.
I always pre-prepare svg icons in a chandelier - I bring them to a single size (viewBox), usually 128 or 256 and align the icon inside the area, as well as by fractional pixels. Then I save it in svg, which are beautifully and without glitches at a gallop.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question