gulp-image-set-plus
v0.2.0
Published
Gulp plugin to add future-proofed support for W3C-style image set notation.
Downloads
16
Maintainers
Readme
Installation
npm install --save gulp-image-set-plus
Usage
var gulp = require('gulp')
var imageSet = require('gulp-image-set-plus')
gulp.task('image-set', function () {
return gulp.src('my-file.css')
.pipe(imageSet())
.pipe(gulp.dest('dist'))
})
gulp.task('default', ['image-set'])
Input
.bg-img {
background-image: image-set(url('my-img.png') 4x);
}
Output
.bg-img {
background-image: url('[email protected]');
background-image: image-set(url('[email protected]') 1x,url('[email protected]') 2x, url('[email protected]') 3x, url('my-img.png') 4x);
}