News for hackers. Stuff that matters.
Re:SimpLESS compiless .less into beautiful .css by MatthewPhillips on Thursday February 09, 2012 @09:38AM (#3571250)
Could someone who uses less regularly lay out the advantages over vanilla css? I see nesting and vender-prefix normalizing, but to me those are pretty small gains. I'm sure I'm missing something.
Re:SimpLESS compiless .less into beautiful .css by dmvaldman on Thursday February 09, 2012 @09:49AM (#3571297)
You. Will. Never. Go. Back.

I mean...variables? Do you never have the same width in two places? That is so simple and so huge. Want to make your shade of green 5% darker? Don't look up a new hexadecimal, just say darken(green,5%).

Make a button "class" where the only input is a color, and it automatically generates a cross-browser rounded-corner button with a slight gradient to 10% darker color, 20% darker border, with 20% lighter inset box shadow.

Really. You will not go back.

Re:SimpLESS compiless .less into beautiful .css by helipad on Thursday February 09, 2012 @09:42AM (#3571265)
Once you start using mixins, you'll never go back. Add a clearfix, IE hack or a cross-browser CSS3 property at the drop of a hat, over and over again.

I also find that just due to the nature of the nesting, I'm writing much tidier CSS as a result.

Re:SimpLESS compiless .less into beautiful .css by envex on Thursday February 09, 2012 @10:04AM (#3571356)
Nesting itself is worth it's weight in gold. Add in mixins, variables, etc and it's just icing on the cake.

I also force myself to add hover states to all the links, even if the client didn't specify it in the designs. Being able to use something like:

@link_color: #ffcc66; @link_hover: darken(@link_color, 15%);

is a HUGE perk.

Re:SimpLESS compiless .less into beautiful .css by gerggerg on Thursday February 09, 2012 @09:57AM (#3571329)
http://lesscss.org/

don't think it touches vendor prefixes.

Re:SimpLESS compiless .less into beautiful .css by CognitiveLens on Thursday February 09, 2012 @11:29AM (#3571720)
I think you're right that it doesn't have built-in simplification of vendor prefixes, but they are trivial to implement into mix-ins (the example on the page you linked shows how), and I suspect it's one of the first things people set up when starting with LESS
Re:SimpLESS compiless .less into beautiful .css by siegecraft on Thursday February 09, 2012 @10:17AM (#3571416)
Also, it makes it super easy to hit the CSS rules-per-file limit that Internet Explorer has.