Skip to content

ngryman/sass-dry

Repository files navigation

sass-dry travis

DRY your SASS code.

sass-dry helps you to factorize repetitive portions of your mixins by creating and extending dynamic placeholders under the hood.

Install

npm install --save sass-dry
bower install --save sass-dry

Usage

@include button($color: #bada55) {
  color: $color;

  @include dry(button) {
    margin: 1rem 0;
    padding: .5rem 1rem;
    border-radius: 1rem;
    border: 1px solid;
  }
}

.order-btn {
  @include button();
}

.cancel-btn {
  @include button(red);
}
.order-btn, .cancel-btn {
  margin: 1rem 0;
  padding: .5rem 1rem;
  border-radius: 1rem;
  border: 1px solid;
}

.order-btn {
  color: #bada55;
}

.order-btn {
  color: red;
}

License

MIT © Nicolas Gryman