borodean / postcss-assets

An asset manager for PostCSS
MIT License
537 stars 32 forks source link

Usage with postcss-at2x #34

Closed 7rulnik closed 8 years ago

7rulnik commented 8 years ago

Hi! I use postcss-assets. It's really cool, thank you.

Can I use it with postcss-at2x?

This way don't work:

background: inline('./img/image.png') at-2x;
borodean commented 8 years ago

@7rulnik postcss-at2x expects url function to be found inside background declaration. Put postcss-assets before postcss-at2x in the list of processors, so the later gets inline and resolve functions compiled to url:

gulp.src('style.css')
  .pipe(postcss([
    require('postcss-assets'),
    require('postcss-at2x') // at2x goes after assets
  ]))
  // ...