maxim / bootswatch-rails

Bootswatches converted to SCSS ready to use in Rails asset pipeline.
MIT License
489 stars 84 forks source link

Less '&-' operator that SASS does not. #56

Closed esbanarango closed 10 years ago

esbanarango commented 10 years ago

LESS supports another use of the & operator that SASS does not:

.parent {
    background: #fff;
    &-child {
        color: #222;
    }
}

produces:

.parent {
    background: #fff;
}
.parent-child {
    color: #222;
}

So we're translating this:

.panel {
  &-heading,
  &-footer {
    border-top-right-radius: 0;
    border-top-left-radius: 0;
  }
}

on this:

.panel {
  .panel-heading,
  .panel-footer {
    border-top-right-radius: 0;
    border-top-left-radius: 0;
  }
}

instead of this:

.panel-heading,
.panel-footer {
  border-top-right-radius: 0;
  border-top-left-radius: 0;
}
maxim commented 10 years ago

@esbanarango hm, this processor should do it. If it doesn't must be a bug: https://github.com/maxim/bootswatch-rails/blob/master/converter#L72-L95

esbanarango commented 10 years ago

@maxim Right, I'll first fix this manually on the .scss files, as they aren't too many. Then I'll fix the processor.