postcss / sugarss

Indent-based CSS syntax for PostCSS
MIT License
707 stars 39 forks source link

nested multiline #21

Closed talgautb closed 8 years ago

talgautb commented 8 years ago

input:

.link
  text-decoration: none
  color: blue

  &:hover,
  &:active,
    text-decoration: underline
    color: lightblue

  &:hover
  &:active
    text-decoration: underline
    color: lightblue

output:

.link {
  text-decoration: none;
  color: blue;
}

.link:hover,
  .link:active,
  .link  {
  text-decoration: underline;
  color: lightblue;
}

.link:hover
  .link:active {
  text-decoration: underline;
  color: lightblue;
}

is it feature or bug ? may be show some error?

ai commented 8 years ago

Seems like a bug. What plugins do you have?

talgautb commented 8 years ago

"postcss-nested": "^1.0.0", "sugarss": "^0.1.2"

ai commented 8 years ago

OK, I will look at weekend.

ai commented 8 years ago

You have wrong trailing comma in

  &:hover,
  &:active,

You can open issue in postcss-nested if you think that it is a bug.