Why Use LESS?
The LESS Advantage
The unique thing about LESS is that it has everything that CSS is missing. It eliminates CSS through the introduction of features like variables, mixins, nesting and others.
Variables – Set constant variables that could be accessed anywhere in the program. You can set a variable, “@yellow” to add the required color. Use it in the stylesheet. If you need to bring any shade changes, all you have to do is change the @yellow value.
Mixins – Using mixins you can embed different properties of a class into another one by just including the class name as a property. It has some similarities to variables. You can define your mixin and use it wherever you require by changing the value. There is a unique type of ruleset to LESS known as parametric mixins. It accepts only parameters but could be mixed in similar classes.
Nesting – LESS supports nesting selectors within other selectors. The feature lets you save on coding, while enabling you to keep the code neater. There is no need to have the conventional long selectors.
Namespaces – The feature enables grouping mixins and variables. It is quite effective in helping avoid naming clashes.