antonj / scss-mode

Emacs mode for SCSS files (http://sass-lang.com)
200 stars 39 forks source link

Weird parenthess indentation #25

Open PythonNut opened 10 years ago

PythonNut commented 10 years ago

scss-mode indents parentheses like this:

a {
  background: linear-gradient(to bottom,
                              red,
                              blue
                             );
}

Which is very strange.

a {
  background: linear-gradient(to bottom,
    red,
    blue
  );
}

Is more inline with general SCSS style (and coding styles that I see in the wild).

Silex commented 10 years ago

it also indents this wrongly (the &:hover part):

.navbar-default
{
  background-color: $bgDefault;
  border-color: $bgHighlight;

  .navbar-brand
  {
    line-height: 50px;
    padding: 0;
    color: $colDefault;

    &:hover, &:focus
                 {
                   color: $colHighlight;
                 }
  }
}

Probably related to #23

Silex commented 9 years ago

I discovered this comes from css-mode and only happens when { is on a line of its own.

art-solopov commented 9 years ago

@Silex I have this even when the bracket is on the previous line:

svg .node {

  a:hover, a:focus {
             text-decoration: none;
  }
}
Mrngilles commented 8 years ago

Same issue for me as @art-solopov