Live data from Hacker News

CSS Minification on the Fly

shinylittlething.com

11–16 of 16 posts

Re: CSS Minification on the Fly

#11
post #8
post #3

We have several raw stylesheets that are full of documentation in the form of css comments. We run these through CSSTidy before concating them all into one file. CSSTidy, while a few years old, does a reasonable job of cleaning out a lot of the cruft that we need internally but don't want to deliver to the end user. You should not be doing any kind of minification or cleanup on your css & js during the page request.…

I think using css sprites is definitely a great technique. But I always find managing sprites a bit hard to manage. Any tips for making managing sprites easier on developers/designers? Any tools in your toolbox?

No tools that I can recommend. Sigh I recommend sprites(I use them all the time) but I have been doing them so long directly in Photoshop that's my default action, especially when in a hurry. I have tried a few tools but found they are very inaccurate.

Re: CSS Minification on the Fly

#13
post #8
post #3

We have several raw stylesheets that are full of documentation in the form of css comments. We run these through CSSTidy before concating them all into one file. CSSTidy, while a few years old, does a reasonable job of cleaning out a lot of the cruft that we need internally but don't want to deliver to the end user. You should not be doing any kind of minification or cleanup on your css & js during the page request.…

I think using css sprites is definitely a great technique. But I always find managing sprites a bit hard to manage. Any tips for making managing sprites easier on developers/designers? Any tools in your toolbox?

I made a tool for this : http://css-sprit.es

Re: CSS Minification on the Fly

#14
post #10

For django, I've been using django-compress: http://code.google.com/p/django-compress/ Works with javascript as well as CSS, nicely incorporates cache control, ahead-of-time or on-the-fly generation, etc. Works out of the box* in pure python, or it's trivial to plug eg YUI minifier or google-closure. * Actually, last I looked there was a bug in the CSS minifier it ships with ( http://code.google.com/p/django-compress…

Thanks, it's nice to know since I was about to do something similar for django too.

Re: CSS Minification on the Fly

#15
post #8

Earlier quoted context omitted.

I think using css sprites is definitely a great technique. But I always find managing sprites a bit hard to manage. Any tips for making managing sprites easier on developers/designers? Any tools in your toolbox?

I made a tool for this : http://css-sprit.es

Thats pretty awesome, I will check it out.

Re: CSS Minification on the Fly

#16
post #10

For django, I've been using django-compress: http://code.google.com/p/django-compress/ Works with javascript as well as CSS, nicely incorporates cache control, ahead-of-time or on-the-fly generation, etc. Works out of the box* in pure python, or it's trivial to plug eg YUI minifier or google-closure. * Actually, last I looked there was a bug in the CSS minifier it ships with ( http://code.google.com/p/django-compress…

[deleted]
Post reply on HN