tags:

views:

40

answers:

3

Is there a tool that can format CSS into a single-line format with indenting?

#content-area ol                {margin: 15px 0 0 25px; list-style: decimal;}
    #content-area ol ol         {list-style: lower-alpha;}
#content-area ul                {margin: 0 0 0 5px; list-style: none;}
    #content-area ul li         {padding: 0 0 0 20px;}
    #content-area ul ul         {margin: 15px 0 0 25px; list-style: disc;}
    #content-area ul ul li      {background: none; padding: 0;}
+1  A: 

I don't know of a tool (for desktop use, I guess?), but you can try minify to do it from within a scripting language (PHP here): Minify

Cassy
+1  A: 

For the Desktop, there's Polystyle ($15, trial available). It allows the definition of very detailed style rules. I've been using it for a while and I'm fairly content with it.

Pekka
+1  A: 

Go to http://www.cleancss.com/, input your CSS, and select "High" from the Compression (code layout) box. It seems to do exactly what you are describing, and you can even tweak it further to fit your needs.

Beerlington
I use this all the time! it's great!
fudgey