carto/README.md

42 lines
883 B
Markdown
Raw Normal View History

2010-02-24 02:39:05 +08:00
less.js
=======
2010-03-07 07:19:36 +08:00
about
-----
less.js is the next evolution of [LESS](http://lesscss.org), 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.
2010-04-23 07:15:11 +08:00
synopsis
--------
### in node.js
var less = require('less');
less.render(".class { width: 10px * 2 }", function (e, css) {
sys.puts(css); // .class { width: 20px }
});
2010-03-07 07:19:36 +08:00
2010-04-23 07:15:11 +08:00
### via the command-line (requires node)
2010-02-24 02:39:05 +08:00
2010-04-23 07:15:11 +08:00
bin/lessc style.less
2010-03-07 07:19:36 +08:00
2010-04-23 07:15:11 +08:00
### in the browser
2010-02-24 02:39:05 +08:00
2010-04-30 05:56:16 +08:00
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:
2010-05-18 11:11:55 +08:00
<link rel="stylesheet/less" href="main.less" type="text/css">
2010-05-19 08:28:24 +08:00
<script src="less.js"></script>
2010-02-24 02:39:05 +08:00
To build a minified version, run `make min`
2010-05-21 10:03:30 +08:00
installation
------------
In node:
$ npm install less