You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

README.md 499B

12345678910111213141516171819202122232425262728
  1. rework-plugin-url
  2. ====================
  3. [![Build Status](https://travis-ci.org/reworkcss/rework-plugin-url.png)](https://travis-ci.org/reworkcss/rework-plugin-url)
  4. Map `url()` calls. Replace all `url()`s using a given function.
  5. ```js
  6. var css = rework(read(css))
  7. .use(rework.url(function(url){
  8. return 'http://example.com' + url;
  9. }))
  10. .toString()
  11. ```
  12. ```css
  13. body {
  14. background: url(/images/bg.png);
  15. }
  16. ```
  17. yields:
  18. ```css
  19. body {
  20. background: url(http://example.com/images/bg.png);
  21. }
  22. ```