carto/README.md

46 lines
981 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-05-27 00:56:07 +08:00
where do I get it?
------------------
The latest builds are in the `dist/` folder.
2010-05-27 00:56:07 +08:00
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-06-17 07:02:50 +08:00
Get the pre-built version from the `dist/` folder, and include it as such:
2010-05-18 11:11:55 +08:00
<link rel="stylesheet/less" href="main.less" type="text/css">
2010-06-17 07:02:50 +08:00
<script src="less.js" type="text/javascript"></script>
2010-02-24 02:39:05 +08:00
2010-06-17 07:02:50 +08:00
Note the `rel="stylesheet/less"` for all stylesheets you want to parse with LESS.
2010-05-21 10:03:30 +08:00
installation
------------
In node:
$ npm install less