SCSS and { position

If I start an SCSS file, and type in: ".classname" and press enter, it indents the next line, it is appears like this (| is caret):


Where I would normally want it to work properly to my coding style to allow me to do:


I have found the location in the preferences where code styles are done, but there is nothing to address this preference.

Is there a way to not assume { is on the same line?

So I do not want to write like this:

.classname {

- zzing.


Hi there,

Please check Settings | Code Style | CSS | Other | Braces placement = Next Line

Works fine when manually reformatting the code (Code | Reformat Code...) -- don't know if it will affect actual editing/typing


This does indeed work for CSS, but the SCSS support is mixed up on how to behave.


First of all -- when you "type ".classname" and press enter" .. the opening brace will NOT be added automatically anyway, regardless of that setting. There is a ticket about adding braces automatically when using Complete Current Statement action (Ctrl+Shift+Enter) -- . When implemented, it should adhere to that setting, so ".classname and Ctrl+Shift+Enter" should produce the desired for you result.

That ticket mentions CSS .. but I guess it will apply to SCSS as well (since it's very similar in this regard) -- but you better confirm this in that ticket with the developer (maybe separate ticket for SCSS is required).

but the SCSS support is mixed up on how to behave

You are welcome to submit new tickets to the Issue Tracker with your concrete ideas/suggestions/etc about current and desired behaviour:


Please sign in to leave a comment.