SitePoint Sponsor |
|
User Tag List
Results 1 to 3 of 3
Thread: Whitespace Tools
Hybrid View
-
Oct 12, 2003, 05:56 #1
- Join Date
- Nov 2001
- Location
- Bath, UK
- Posts
- 2,498
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Whitespace Tools
Hi all,
Can someone reccomend a tool to remove (most) whitespace from CSS files?
I want it to be able to chage this:Code:selector { property: value; property: value; property: value; } selector, selector { property: value; property: value; property: value; }
Code:selector {property: value;property: value;property: value} selector, selector {property: value;property: value;property: value}
Any tips appreciated.
Thanks,
DouglasHello World
-
Oct 12, 2003, 11:30 #2
- Join Date
- Jan 2003
- Location
- Hampshire UK
- Posts
- 40,556
- Mentioned
- 183 Post(s)
- Tagged
- 6 Thread(s)
Hi Doug,
I don't know of any free tools but Top Style pro has a style sweeper which will do what you want (and more) but its about $80 I think.
Paul
-
Oct 16, 2003, 13:53 #3
- Join Date
- Jul 2003
- Location
- Pittsburg, KS
- Posts
- 191
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Doug,
I use a freeware tool called Absolute HTML Compressor to compress my xhtml and css files. When compressing, it removes the line breaks between CSS rules too, which is a little more than you wanted. It does not uncompress either, but you can do that for yourself using search & replace - i.e.
Search for ; and replace with ;+carriage return
Search for } and replace with }+carriage return
I copy my source files into another directory called 'optimized' and run the compressor on this new directory. That way I don't overwrite my white space version, which is easy to edit.
Hope this helps,
Andy.Learn the Emotional Freedom Technique at www.as-if-by-magic.com
Bookmarks