rework-image-set-plus
v0.2.0
Published
Rework CSS plugin to add future-proofed support for W3C-style image-set notation.
Downloads
8
Maintainers
Readme
npm install --save rework-image-set-plus
Usage
var fs = require('fs')
var rework = require('rework')
var imageSet = require('rework-image-set-plus')
var css = fs.readFileSync('css/my-file.css', 'utf8').toString()
var out = rework(css).use(imageSet()).toString()
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);
}