I am using gulp.spritesmith to automate sprite image and css generation. All works good except the generated css is haivng "icon-" prefix. I don't want to add this prefix as I have existing HTML markup and I don't want to change the markup. Following is my gulp task.
'use strict';
var gulp = require('gulp');
var spritesmith = require('gulp.spritesmith');
gulp.task('sprite', function () {
var spriteData =
gulp.src('./sprite/*.*') // source path of the sprite images
.pipe(spritesmith({
imgName: 'sprite.png',
cssName: 'sprite.css'
}));
spriteData.img.pipe(gulp.dest("./css")); // output path for the sprite
spriteData.css.pipe(gulp.dest("./css")); // output path for the CSS
});
Following is my generated css.
.icon-icon1 {
background-image: url(sprite.png);
background-position: 0px 0px;
width: 120px;
height: 120px;
}
.icon-icon2 {
background-image: url(sprite.png);
background-position: -120px 0px;
width: 120px;
height: 120px;
}
Please help to supress "icon-".