Mária Jurčovičová edited this page Nov 26, 2015 · 23 revisions

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.

Less Language

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.

Compiler Features

Less4j compiler can run embedded from any java project or run from command line. It has also some additional features to make work with less easier:

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.

Featured plugin: less4-javascript plugin which adds embedded/escaped JavaScript support to less4j.

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.

Css Compatibility

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.

Old Releases

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.

Other Pages

Complete list of all this wiki pages is located in standard Github pages page.