postcss-map-url
Ported from rework-plugin-url
PostCSS plugin that maps over each url
property in a declaration.
Installation
$ npm install postcss-map-url --save-dev
.mapUrl(mapFn)
Takes a callback function that recieves the url
Usage
var fs = ;var postcss = ;var mapUrl = ; var css = fs; var output = css; // Your map function that takes the url as a parameter and// should return a modified url { return 'http://example.com' + url;}
Input
Output
See PostCSS docs for examples for your environment.