Doing more with LESS.
As part of our ongoing work on our Joomla components we have been looking at the ‘next’ logical change that we want to implement with the CCS styles. This is of course making use of the LESS compiler.
What is LESS you might ask. Well LESS is a dynamic stylesheet language, which extends CSS with dynamic behaviour such as variables, mixins, operations and functions. It can run upon both the server-side or client-side (modern browsers only) on a site.
Variables: Variables allows one to specify widely used values in a single place, and then re-use them throughout the style sheet, making global changes as easy as changing one line of code.
Mixins: Mixins allows one to embed all the properties of a class into another class by simply including the class name as one of its properties. It’s just like variables, but for whole classes. Mixins can also behave like functions, and take arguments.
Nested Rules: Rather than constructing long selector names to specify inheritance, in Less one can simply nest selectors inside other selectors. This makes inheritance clear and style sheets shorter.
LESS is of course used in Joomla 3.x along with the Bootstrap template so is an obvious enhancement that we would want to make, however whether this will be on the Joomla 2.5 supported versions or just for our Joomla 3.0 versions (when ever they become available) is a matter for conjecture.
Our current CSS work (with Issue Tracker) is progressing nicely so is probably not ready yet to take advantage of LESS, however it is something we will be closely watching and implementing in the fullness of time.