Space in CSS declaration after colon

Hello. Help me please in my little trouble. I'm using PhpStorm 2.0.1. When i edit the css code, IDE, by default, don't put spaces after colons. It's looks like this:



div
{
  text-align:center;
  border:1px solid;
}




No spaces! I want it to look like this:



div
{
  text-align: center;
  border: 1px solid;
}



How, and why it's so by default ? It's wrong, i think.

4 comments
Comment actions Permalink

Well, its can't be "wrong" because its correct CSS. It just the code formatting, and it can be performed in a number of quite different ways.

Anyway what do exactly you mean under "IDE, by default, don't put spaces after colons"? When and how you expect it to "put" them? Are you invoking the "format source" action? Or typing the code? Or refactoring it?

Please provide step-by-step description of your actions, actual result and expectations. Be as specific as possible.
And if you pretty sure that this is incorrect file a new request to project issue tracker.

0
Comment actions Permalink

Alexey Gopachenko, thanks for the quick response.

It's all about autocomplete. When I start typing css property the IDE offers autocomplete. I choose the desired option and press Enter. ( | - it's cursor )

text-align:|

IDE don't put the space after colon automatically. Next i chose desired value from autocomplete:

text-align:center;


I want it to be as this:

text-align: |
text-align: center;


I had not found settings, how i can format this. Settings in File -> Settings -> Code Style -> CSS are very few.
I'm don't using code formatter from Code -> Reformat code, because it's even worst: it put this spaces, what i'm talking about, but it also put empty lines after each css block. It looks bad and takes a lot of space. Are you agree?

I'm trying to use PhpStorm, and i like it, but some little problems make me "sad" :) Advice please.

0
Comment actions Permalink

Hello, Brabus

We already have this feature request. Please, vote
http://youtrack.jetbrains.net/issue/WI-5422

0
Comment actions Permalink

Okey, good, thank you. I hope this request will be made quickly. Voted.

0

Please sign in to leave a comment.