PHPStorm CSS every property in one line

Hi there.

I'm coming from the old tool Dreamweaver. 

In Dreamweaver we have an option in "Preferences" > "Code Format" > "Advanced Format" > CSS and then we have an option: "Every property in a separate line".

This change CSS code to be auto format in dreamwever (ctrl + alt + L in phpstorm) of that change code: 

From this:

.languages .active {
width: 22px;
height: 16px;
display: block;
margin-top: 2px;
}

.languages .fhover {
width: 22px;
height: 16px;
}

to this:

.languages .active { width: 22px; height: 16px; display: block; margin-top: 2px; }
.languages .fhover { width: 22px; height: 16px; }

When you click dreamweaver to auto format CSS, if this option selected, it will get format (all properties in one line).

I tried to do the same in phpstorm but can't. Tried to find some posts about this and also can't find.

In phpstorm we have this way and maybe I can't find where?

 

Thank you for help!

3 comments
Comment actions Permalink

Hi there,

AFAIK there is no such option. It either leaves rules untouched (in terms of how many instructions are per line) or expands them 9does opposite to what you are asking here).

https://youtrack.jetbrains.com/issue/WEB-236 -- this is a parent ticket for all particular CSS-formatter tickets -- see if you can find that particular one. If not -- feel tree to submit new feature Request ticket.

 

P.S.

If you are using VCS/diff viewer to see the changes compared to previous version etc -- having one instruction per line is MUCH better and considered a default/desired setting.

0
Comment actions Permalink

Well, its sad to see a big software like this don't have this little option.

Let's wait the future, maybe they release it.

In this time, ill reformat my CSSs in my old dreamweaver!

 

Thank you for your time!

0
Comment actions Permalink

Hello,

The development team won't know that somebody needs this feature without a feature request.

So if you are up to it, checking the parent ticket as Andriy suggested is the best thing to make it happen.

1

Please sign in to leave a comment.