Macrotone Blogs

Macrotone blogs upon Joomla, our products and other matters.
Font size: +
2 minutes reading time (341 words)

Doing more with LESS.

http://lesscss.org/images/logo.pngAs 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.

 

  1. 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.

  2. 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.

  3. 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.

  4. Functions & Operations: If there are some elements in a style sheet that are proportional to other elements, operations permit one to add, subtract, divide and multiply property values and colours, giving the power to create complex relationships between properties. Operations should only be performed within parentheses in order to ensure compatibility with CSS. Functions map one-to-one with JavaScript code, allowing you to manipulate values however one wants.

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.

×
Stay Informed

When you subscribe to the blog, we will send you an e-mail when there are new updates on the site so you wouldn't miss them.

Private IP addresses visible on Internet?
Web Standards
 
Go To Top

Joomla! Debug Console

Session

Profile Information

Memory Usage

Database Queries