Is there a SASS.js? Something like LESS.js?
There is no officially sanctioned JavaScript implementation of sass or scss. There are a couple of implementations in progress that I've seen, but none that I can recommend using at this time.
However, please a few points:
- Why should you make all your users compile your stylesheets when you can do it once for all of them.
- What would your site look like if JavaScript is disabled.
- If you decide to change to a server-side implementation at a future time, all your templates must be changed accordingly.
So while it's a little more setup to get started, we (the sass core team) think that server side compilation is the best long term approach. Similarly, the less developers prefer server side compilation for production stylesheets.
Since visionmeda/sass.js isn't available anymore and scss-js hasn't been updated in 2 years, I might interest you in sass.js. It's the C++ library libsass (also used by node-sass) compiled to JavaScript using Emscripten. An implementation to compile scss stylesheets linked or inlined in html can be found at sass.link.js.
Try out sass.js using the interactive playground
YES
As we were expecting, after rewriting it on C++, it is possible to compile it in Javascript via Emscripten.
This is browser version: https://github.com/medialize/sass.js/
As they recommend, for node you can use this one: https://github.com/sass/node-sass
I just discovered an interesting Sass.js Playground. A few things may have changed over the years. Check this out:
http://medialize.github.io/playground.sass.js/