News for hackers. Stuff that matters.
Re:How to Manage CSS Explosion by callahad on Thursday January 27, 2011 @01:02AM (#2146788)
The current version of Less is really impressive. It's written in JavaScript, which lets you do crazy things like:

  <link rel="stylesheet/less" type="text/css" href="styles.less">
  <script src="less.js" type="text/javascript"></script>
Since it's a superset of plain CSS, both the migration and the learning curve are really pleasant.
Re:How to Manage CSS Explosion by cyen on Thursday January 27, 2011 @04:40AM (#2147267)
It's a little absurd to about the simple changes / features necessary (variables? nesting? c'mon) to make CSS bearable again (if it ever was).

Then you take a look at some of the additional goodies - fadeout(), desaturate(), etc - that have been included in the most recent release, and you wonder how you ever kept your color palette organized before.

Less has prevented me from wanting to claw my eyes out during a recent round of frontend work - just for that, I'm incredibly grateful.

Re:How to Manage CSS Explosion by robin_reala on Thursday January 27, 2011 @04:07AM (#2147202)
Why would you want to do this on the client and slow the whole site down? I can understand (though don’t personally want to use) a server-side preprocessor, but doing it in realtime on the client seems counterproductive.

And what? I’ve just checked out the minified version of less.js and it clocks in at 32kB. Seriously?

Re:How to Manage CSS Explosion by ramanujan on Thursday January 27, 2011 @04:23AM (#2147232)
I think the idea is to use a pure JS implementation of CSS for debugging/dev, and do prerendering of a minimal CSS file before deploy.
Re:How to Manage CSS Explosion by dhimes on Thursday January 27, 2011 @08:47AM (#2147751)
Why do you say that doing this on the client would slow the site down? That's counter-intuitive to me. I'm trying to push everything I can off to the client (client machines seem pretty good) in order to keep things on the server speedy- but it's my first web app, so I'm new in this space. Thanks.
Re:How to Manage CSS Explosion by isleyaardvark on Thursday January 27, 2011 @09:51AM (#2147979)
It's the opposite, I recommend you check out the work of Steve Souders, his blog and his books (http://stevesouders.com/). The general idea is that the server is going to be speedier (through a combination of hardware than caching) than the user's machine. And there are a lot of old machines out there.

Souders estimates that around 80-90% of a site's slowness has to do with the time it takes for the browser renders the page, js slows that down.

Re:How to Manage CSS Explosion by dhimes on Thursday January 27, 2011 @11:11AM (#2148329)
Thanks for the link. Browsing "Even Faster Web Sites" he cited 14 rules from the first book ("High Performance Web Sites") in the preface. Rule 1: Make Fewer HTTP Requests. I guess this is what I had in mind. I have a request get the data, but how I allow user to render it different ways. So the local rendering is done in JS.

I'm still building, but it look like I better give this a second look.

I'm also in the education space, so where there are crappy machines there are also likely crappy networks.

Re:How to Manage CSS Explosion by almost on Thursday January 27, 2011 @09:32AM (#2147900)
If you do it on the server you do it once (when you deploy), if you do it on the client it happens every single time.
Re:How to Manage CSS Explosion by statictype on Thursday January 27, 2011 @08:56AM (#2147777)
On mobile browsers, the speed at which the javascript interprets your data may actually be slower than sending the pre-interpreted data over the wire. Even on 3G.