What is LESS?
LESS is a css pre-compilier that has gained popularity over the past few years. There are a few good introductions to the language you can find here:
So I thought I would share what I like about LESS the most.
Syntax– I like how LESS introduces features such as variables and mixins without the overhead of learning new syntax. In addition, the use of nested rules feels like a native feature to regular css.
Variables – As mentioned previously, variables is a new introduction to css. I find variables mainly assigned to colors and they allow developers to define colors in one place so they can be changed easily without using search and replace.
Nested rules– Nested Rules are by far the greatest feature to regular css. They make css more DRY and easier to read as their inheritance is cleary visable. Nested selectors also force the developer to group togather related css within the file.
Functions – I havn’t used functions too much, but where I have, they really do help reducing duplicate code.
In conclusion, LESS is a WIN for me. It helps organize CSS in a “natural” way. It also helps keep LESS DRY. So there you go, LESS, it’s a good thing.