Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Browse files

Add more info on client side options.

  • Loading branch information...
1 parent ff87bb5 commit 52c19a5b3adbc200fba48bdf85340f3948df72b6 @lukeapage lukeapage committed
Showing with 30 additions and 0 deletions.
  1. +30 −0 templates/pages/
30 templates/pages/
@@ -14,6 +14,26 @@ Then download `less.js` from the top of the page, and include it in the `<head>`
Make sure you include your stylesheets *before* the script.
+You can set options by setting things on a global less object before the script. E.g.
+ <script type="text/javascript">
+ less = {
+ env: "development", // or "production"
+ async: false, // load imports async
+ fileAsync: false, // load imports async when in a page under
+ // a file protocol
+ poll: 1000, // when in watch mode, time in ms between polls
+ functions: {}, // user functions, keyed by name
+ dumpLineNumbers: "comments", // or "mediaQuery" or "all"
+ relativeUrls: false,// whether to adjust url's to be relative
+ // if false, url's are already relative to the
+ // entry less file
+ rootpath: ":/"// a path to add on to the start of every url
+ //resource
+ };
+ </script>
+ <script src="less.js" type="text/javascript"></script>
Watch mode
@@ -22,6 +42,16 @@ Watch mode
To enable it, append '`#!watch`' to the browser URL, then refresh the page. Alternatively, you can
run `` from the console.
+It is possible to output rules in your css which allow tools to locate the source of the rule.
+Either specify the option `dumpLineNumbers` as above or add `!dumpLineNumbers:mediaQuery` to the url.
+You can use the "comments" option with [FireLESS]( and
+the "mediaQuery" option with FireBug/Chrome dev tools (it is identical to the SCSS media query debugging format).
Server-side usage

0 comments on commit 52c19a5

Please sign in to comment.
Something went wrong with that request. Please try again.