22i design - web design Farnborough

Sunday, September 07, 2008



This page uses Valid CSS
Valid HTML 4.01!
For what it's worth, 22i design is a member of the UKWDA
Get FireFox - The Browser ReLoaded



22i DESiGN » Design Blog » Design Blog: DW8 Find & Replace \n

Thursday, July 19, 2007

DW8 Find & Replace \n

I just found out something really cool in DreamWeaver 8's Find & Replace, here's the crack...

I had a compressed & optimised CSS file, with no line breaks. Thing is that I needed a version WITH line breaks so that it can be worked on a bit easier THEN optimised and compressed.

Trouble is that DreamWeaver doesn't appear to have the option I wanted... I wanted to replace every brace character } with a brace } and a new line/ carriage return/ line feed. I checked DreamWeaver's Help and it didn't enlighten me.

So I just went ahead and did what I thought might work, taking the CRLF knowledge from PHP into DreamWeaver, making sure, because this was a test, to only apply the Find & Replace to the current document ;)

Find: }

Replace: }\n

Replace All

It worked!

Obviously if your CSS is fully compressed you can give every single selector a line break with find & replace on opening braces { and replace with {\n and replace every semicolon ; with ;\n

Labels: , , ,

0 Comments:

Post a Comment

Links to this post:

Create a Link

<< Home