Background image using Gulp and Sass -
i searched , found these background images path in sass , compass, multiple background images using sass / compass, sass background images
please bear me since new gulp. don't have separate config.rb file , set in gulpfile.js. here have
compass = require('gulp-compass'); gulp.task('compass', function(){ gulp.src(sasssources) .pipe(compass({ // loading config without config.rb sass: '1_components/sass', style: 'expanded', image: '2_builds/development/images' })) .on('error', gutil.log) .pipe(gulp.dest('2_builds/development/css')) .pipe(connect.reload()) }); gulp.task('watch', function(){ gulp.watch(jssources, ['js']); gulp.watch('1_components/sass/*.scss', ['compass']); gulp.watch(htmlsources, ['html']); });
and in sass file when type
#section0, #emptyattach { @include background (linear-gradient(center left, rgba(0, 0, 0, .6), rgba(0, 0, 0, .1)), image-url('second.png')); }
it not picking image given directory. highly appreciate if give me complete explanation how set background image in gulp using sass.
Comments
Post a Comment