Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Leaner CSS, in your browser or Ruby (via less.js).

Merge pull request #78 from rstacruz/patch-2

Changelog: fix 2.6.0 version typo
latest commit 8d94cdd068
Charles Lowell authored
Failed to load latest commit information.
bin Define options for lessc --include-path optparse.
lib v2.6.0
spec Fixing the unit tests
.gitmodules change less.js submodule url
.travis.yml test on travis with jruby as well Changelog: fix 2.6.0 version typo
Gemfile v2.5.0 Merge remote-tracking branch 'codeodor/patch-2'
Rakefile spec is now default rake task.
less.gemspec license is ASF 2.0 (same as for less.js)


The dynamic stylesheet language.

Build Status


These are Ruby bindings for the next generation LESS, which is implemented in JavaScript

For more information, visit


less.rb exposes the less.Parser constructor to ruby code via Less::Parser. You can instate it context free:

parser =

or with configuration options:

parser = :paths => ['./lib', 'other/lib'], :filename => 'mystyles.less'

Once you have a parser instantiated, you can parse code to get your AST !

tree = parser.parse(".class {width: 1+1}") # => Less::Tree
tree.to_css #=> .class {\n  width: 2;\n}\n
tree.to_css(:compress => true) #=> .class{width:2;}


This repository contains less.js as a submodule, so to run the tests, you'll need to grab that code as well. To do that, run git submodule update --init from the root directory of the project.

To run the tests:



less.rb is licensed under the same terms as less.js

See lib/js/LICENSE file.

copyright 2011,2012 Charles Lowell

Something went wrong with that request. Please try again.