Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Clone this wiki locally
Less language adds dynamic features into style sheets. Standard css is good in describing how the page should look like, but it is purely descriptive language. Reusing properties or give names to constants is very hard or even impossible. If multiple elements share the same properties (color, margin), any change of these common properties must be done on all those places. That often leads to long and hard to maintain style sheets.
Less language is an attempt to solve these problems.
Less4j is work in progress. Those parts of Less language that has already been ported are described in Supported Less Language page. Although less4j is a port and its goal to behave the same way as less.js does, there are some differences between them and we have documented them on Differences Between Less.js and Less4j page.
Newly added less dynamic features occasionally interact with standard style sheet grammar. In addition, less.js is in development too. This leads to certain language quirks - grammar features that may lead to confusion if you do not know about them. We list them on Quirks page.
- add less variables from java,
- generate source maps,
- be extended with custom functions,
- compress css output.
The compiler can be customized in three different ways:
- custom less source implementation can be used to
- read sheets from unsupported places (database, other directories),
- set import file sources or search path by code,
- generate less files on the fly,
- ... .
- custom functions are new functions written in java and available inside less files,
- embedded script is code written directly inside less files and compiled by any JVM compatible compiler.
Additional performance feature: If you compile multiple large sheets that import and reuse same less sheets, you can reuse compiler cache between runs. Use with caution, may cause faults if imported data change between consecutive runs. This feature is available only when compiler runs embedded inside java project.
Less compiler is expected to be compatible with standard css. We adopted some w3c css3 specification test cases in order to prove that it really is the case. These efforts are documented in W3C CSS3 Specification Compatibility page.
This wiki is updated as we go and accurately describes latest development version (e.g. HEAD). If you want to bother with older versions, history is stored in git. Versions corresponding with releases are available under same tags as the released code.
A list of all releases is on Released Versions page.
Complete list of all this wiki pages is located in standard Github pages page.