LESS and SASS are really cool CSS pre-processors. I've been using LESS for some years now, but a new project has called a 'nudge-nudge, wink-wink' on me, and I've finally switched over to SASS using the scss syntax (
here's the difference between the sass and scss syntaxes).
When using LESS, I often found myself in need of
LESS Hat, which is a set of very useful universal mixins for LESS. With the library at hand, I need not worry about browser prefixes, and a handful of other things.
That said, I'm starting to find SASS a better fit for my needs. It seems a lot more mature than LESS, and is capable of more. For example, it's quite a pain to get for-loops working in LESS, and it's a syntactical nightmare. In SASS, however, it's much simpler - in fact, it's built right into the core. I could easily make my own grid-framework using a simple for-loop:
Code:
$columns: 16;
@for $i from 1 through $columns {
.col-#{$i} {
width: ((100 / $columns) * $i) * 1%;
}
}
Which compiles to:
Code:
.col-1 { width: 6.25%; }
.col-2 { width: 12.5%; }
.col-3 { width: 18.75%; }
.col-4 { width: 25%; }
.col-5 { width: 31.25%; }
.col-6 { width: 37.5%; }
.col-7 { width: 43.75%; }
.col-8 { width: 50%; }
.col-9 { width: 56.25%; }
.col-10 { width: 62.5%; }
.col-11 { width: 68.75%; }
.col-12 { width: 75%; }
.col-13 { width: 81.25%; }
.col-14 { width: 87.5%; }
.col-15 { width: 93.75%; }
.col-16 { width: 100%; }
If you want to get onto the pre-processor train, I'd already recommend SASS with the scss syntax (so as not to make things too confusing at the onset). You'll need to install Ruby on your system, along with the sass-gem. Not sure what IDE or code editor you're using, but many of them have some kind of plugin/extension that watches your SASS code for changes, and then automatically compiles. I'm currently using SASS Build in Sublime Text 3. You can also use Grunt/Gulp to build your stylesheets - I do this for larger projects.
As for pros and cons: Using a pre-processor will save you tons of time, depending on the size of your project. SASS and LESS allow you to create CSS-maps as well - this helps with the debugging process, especially when you've set the compilers to minify your output to save bandwidth (this is also a pro). Can't think of any cons at this point, other than the fact that you'd need to make sure that any developers/designers you pass the code onto knows how to use it. This is often the reason people use build tools like Gulp/Grunt, which more and more folks are making use of these days.
Side-tip: There's also
PostCSS, but I'd recommend working with a pre-processor first.