Closed dlip closed 9 years ago
This library doesn't have access to the filesystem to check image dimensions, because it's trying to get close to compass using only sass script. Those would have to be implemented in C++ in libsass or using libsass's custom functions, when they land. https://github.com/sass/node-sass/issues/332
@michaek I see that node-sass added custom functions, but I'm still not able to use image-width or image-height functions. Any update on this?
For those who came across this issue, this library called node-sass-asset-functions provides polyfills for all these functions:
image-url($filename: null, $only_path: false)
image-width($filename: null)
image-height($filename: null)
font-url($filename: null, $only-path: false)
font-files($filenames...)
You can integrate it in your node-sass.
When I try to use image-width and image-height in my sass, the result is not calculated, rather the outputted css has the original image-width/height function calls inline.
Does this library handle compass helper functions?