The most advanced responsive front-end framework in the world. Quickly create prototypes and production code for sites that work on any kind of device.
I just wonder why foundation setup didn't include or come with built-in sprite support. Any chance you guys will include in future releases or?
By the way, if by chance anyone reading this i will show the code that i wrote and it is working for generating sprites and sccs/css
add following in your package.json
/*
* @summary For sprites config only, generating sprite css and image
* @author danish
*/
var csso = require('gulp-csso');
var buffer = require('vinyl-buffer');
var merge = require('merge-stream');
var spritesmith = require('gulp.spritesmith');
function sprite() {
var spriteData = gulp.src('src/assets/img/sprite/*.png')
.pipe(spritesmith({
imgName: '../img/sprite.png',
cssName: '_sprite.scss'
}));
var spriteImg = spriteData.img.pipe(gulp.dest('src/assets/img'));
var spriteCss = spriteData.css.pipe(gulp.dest('src/assets/scss/modules/'));
if (!PRODUCTION) return (spriteImg && spriteCss);
}
and in your watch function add below mentioned line0
gulp.watch('src/assets/img/sprite**/*', gulp.series(sprite, browser.reload));
after doing all of this hazard, just do npm install and drop images which needed to be as sprite in your images folder under sprite folder.
For more info and detail see link below.
Thank you!
Sprites are probably too app-specific for the library. But this would make an excellent building block. (As this isn't a bug, I'm going to close the issue.)
I just wonder why foundation setup didn't include or come with built-in sprite support. Any chance you guys will include in future releases or? By the way, if by chance anyone reading this i will show the code that i wrote and it is working for generating sprites and sccs/css add following in your package.json
and this bit in foundation gulpfile.babel file
after doing all of this hazard, just do
npm install
and drop images which needed to be as sprite in your images folder under sprite folder. For more info and detail see link below. Thank you!