postcss-zombiebox-multires-assets
v1.0.0
Published
PostCSS plugin to support multi resolution assets in ZombieBox applications
Downloads
2
Readme
postcss-zombiebox-multires-assets
PostCSS plugin to support multi resolution assets in ZombieBox application.
Usage
Instantiate the plugin passing resolutions
option, e.g.:
const postcss = require('postcss');
const multiresAssets = require('postcss-zombiebox-multires-assets');
postcss([multiresAssets({
resolutions: ['hd', 'full-hd']
})]);
So with the config above this:
.w-button .w-button__icon {
background-image: url(img/icon.png);
}
will be transformed to this:
.w-button .w-button__icon {
background-image: url(img/icon.png);
}
.zb-hd .w-button .w-button__icon {
background-image: url(img/hd/icon.png);
}
.zb-full-hd .w-button .w-button__icon {
background-image: url(img/full-hd/icon.png);
}