-
Notifications
You must be signed in to change notification settings - Fork 135
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Custom functions #27
Comments
Yes, I have custom functions on the radar. What's keeping this from happening is my inability (and lack of time to learn) to figure out the marshaling: We need to expose Sass_Value in some sort of C++ class, so we can have emscripten marshal the data structure automatically using WebIDL Binder. We need a two way binding (export to JS, import from JS), and for that WebIDL looks like the better option than embind. Unlike node-sass' implementation, Sass.js will have to make functions work asnychronously, which is not as big of a problem, since we already figured out how to accomplish that using emterpreter for the Importer API. Custom functions will happen, I'm just not sure when I'll get to land this. Anyone comfortable with C/C++ and emscripten can certainly have a go at it any time, though ;) |
Is there any progress on this issue? :) |
Unfortunately not. The last attempt to figure this out was in early 2016 and there's been 0 effort since. Do you want to look into this? |
I would love to, but I'm not familiar with C/C++ or emscripten |
I think it'd be awesome if there was a way to define a function like how node-sass does: (from sass/node-sass#644)
Right now, thanks to import hooks, some half dynamic functionality can be put into styles (like inserting the current date into a comment could be done by stuffing it into a variable in an imported "file") but custom functions could potentially allow for something like compass to be used by sass.js
The text was updated successfully, but these errors were encountered: