How do you turn off CSS reformatting?

It's driving me absolutely insane. I have a CSS file formatted with a single style per line, and Phpstorm INSISTS on reformatting it to style per block.

For example:

#header .profile ul li { margin-top: 6px; padding-left: 15px; background: url(images/help-ico.png) no-repeat 0 0; }

Will get formatted into:

#header .profile ul li {
 margin-top: 6px;
 padding-left: 15px;
 background: url(images/help-ico.png) no-repeat 0 0;

I can't seem to find a way to turn it off and the style settings don't allow me to change it to this formatting.
Comment actions Permalink

Hi there,

The only thing I can suggest is Settings | Code Style | CSS | Other | Keep single-line blocks. Other than that I can only say -- use 3rd paty tool for your CSS formatting that will allow you to customize formatting rules (for example: )

Comment actions Permalink

Thanks Andriy. This did the trick for copy/paste. All I need for now, but would be nice to have more control over auto-formatting of CSS in the future.


Please sign in to leave a comment.