Go to file
2010-05-04 20:37:14 -04:00
benchmark Overhaul of the error system 2010-04-25 19:39:21 -04:00
bin Overhaul of the error system 2010-04-25 19:39:21 -04:00
build Array.isArray compat 2010-04-01 22:37:29 -04:00
lib/less be more flexible, pattern matching 2010-05-04 20:37:06 -04:00
test whitespace 2010-05-04 20:37:14 -04:00
index.js Overhaul of the error system 2010-04-25 19:39:21 -04:00
LICENSE moved to apache license 2010-03-04 14:46:41 -05:00
Makefile added compat.js and tree.js to build, it now builds in dist/ 2010-03-29 22:24:09 -04:00
package.json version bump to 1.0.3 2010-04-30 14:09:16 -04:00
README.md fixed readme. 2010-04-29 14:56:16 -07:00
VERSION version bump to 1.0.3 2010-04-30 14:09:16 -04:00

less.js

about

less.js is the next evolution of LESS, eventually, it will become LESS 2.0. less.js is a complete rewrite of LESS in JavaScript, and will be able to run directly in the browser, as well as on the server, with node.js.

synopsis

in node.js

var less = require('less');

less.render(".class { width: 10px * 2 }", function (e, css) {
    sys.puts(css); // .class { width: 20px }
});

via the command-line (requires node)

bin/lessc style.less

in the browser

First, run make less in the command line. It will the build the less.js file in dist/. Then, you can use it as such:

<script src="less.js"></script>
<link rel="less" href="main.less" type="text/css">

To build a minified version, run make min