vaadin / sass-compiler

A Java Sass compiler implementation
53 stars 26 forks source link

Nested blocks in loops are not moved to top level #238

Closed vaadin-bot closed 10 years ago

vaadin-bot commented 10 years ago

Originally by @hesara


Unnesting does not take place correctly in the following SCSS:

.outer {
  .v-ie8 & {
    @for $i from 1 through 1 {
      .top {
        x: $i;
      }
    }
  }
}

Vaadin Sass compiler produces

.v-ie8 .outer {
    .top {
    x: 1;
}
}

instead of the correct

.v-ie8 .outer .top {
  x: 1;
}

Imported from https://dev.vaadin.com/ issue #14097

vaadin-bot commented 10 years ago

Originally by @hesara


Simpler example:

.outer {
  @for $i from 1 through 1 {
    .inner {
      x: $i;
    }
  }
}

should produce

.outer .inner {
  x: 1;
}