Search code examples
cssnpmsasscompassnode-sass

SCSS: node-sass replacement for old Compass image-width function


I am porting an legacy web project that used Compass for SCSS compilation to build with node-sass since Compass requires Ruby and seems to be about three years dead.

One of the SCSS files contains calls to the 'image-width' function supported by Compass:

padding-left: $message-box-icon-padding * 2 + image-width('messages/loading.gif');
width: image-width('messages/loading.gif');
height: image-width('messages/loading.gif');

Fortunately there are only three and it seems the third should have been image-height.

What should replace these calls to image-width?


Solution

  • sprite-magic-importer replaces most of the features of COMPASS.