At 16:00 +1100 30.11.2004, Sameer Kekade wrote:
>I am looking for a tool that automatically indents CSS files for me.
>Does anyone know about such tool?
On the Macintosh, BBEdit will do this for you.
Otherwise, on any platform, if your text editor does search and
replace, you can do a pretty good job with three replace operations:
Pattern Replace
{ {\n\t
; ;\n\t
} }\n\n
In other words, replace each instance of '{' by '{' followed by a
newline and a tab, each instance of ';' by a ';' followed by a
newline and a tab, and each instance of '}' by a '}' followed by two
newlines.
Watch out if your CSS contains some of the gnarlier hacks, as any
reformatting could break the hack.
Angus
--
Business: http://www.nomadcode.com/
Personal: http://www.raingod.com/angus/
Political: http://www.gollum2004.com/
Weblog: http://www.disoriented.net/
______________________________________________________________________
css-discuss [EMAIL-REMOVED]]
http://www.css-discuss.org/mailman/listinfo/css-d
List wiki/FAQ -- http://css-discuss.incutio.com/
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/