Go to file
2010-04-30 14:06:36 -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 New % function, to perform string interpolation 2010-04-30 14:06:36 -04:00
test fixed selector attributes not parsing with a '-' 2010-04-28 17:29:22 -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 package.json update 2010-04-23 13:39:00 -04:00
README.md added information on building less.js, in readme 2010-04-29 17:54:34 -04:00
VERSION bumped version to 1.0.1 2010-04-23 13:38:43 -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 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