Using Less has been one of the most profound upgrades in my use of programming techniques in quite a while. Hopefully browsers will eventually support even more Less-like features.
Using Less has been one of the most profound upgrades in my use of programming techniques in quite a while. Hopefully browsers will eventually support even more Less-like features.
1. constants (mostly for colors and a few sizes)
2. mixins/functions/macros for not-completely-standard properties (e.g. gradients, shadows), makes it easier to not forget a prefixed version, easier to update the definition when needed and much, much easier to read
3. nesting and continuations, especially for styling various states of e.g. a link (having to copy/paste a given selector 4 times and change the pseudo-class is no fun).
Still requires some care though, overusing e.g. nesting can mean you find yourself with fucked up huge selectors in the final file.
Don't look at them, use then, and you'll see.
>I don't want a turing-complete language in my css. Simple variable expansion will suffice--basically just syntactic sugar.
And they are mostly that --simple variable expansion. But arithmetic is also handy, e.g
.sidebar { width: @page_width - @content_width }
That said, they are not turing-complete as far as I know.
>I don't want yet another game of "find the definition" buried under a hierarchy of indirection.
You never get that. You only have to look at the LESS or SASS file, never the generated CSS.
And you can mentally map what you see in the browser's CSS inspector with the relevant LESS/SASS rule trivially.
It's nothing like Coffeescript in this regard, where you (sometimes) have to hunt to see the original error.
They do look nice but currently I still prefer not to blur the edges of what is or isn't CSS.