rits
rits

Reputation: 1544

Is there a SASS equivalent for this LESS code? Variable with multiple styles

Is there something similar in Sass than I can use to achieve this?

@discount-title:{
    text-transform: uppercase;
    font-weight: 600;
    line-height: 14px;
    margin-bottom: 10px;
};
.discount {
    @discount-title();
}

Upvotes: 0

Views: 24

Answers (1)

dommmm
dommmm

Reputation: 908

They're known as mixins in Sass.

http://sass-lang.com/guide#topic-6

This is how the same code will look in sass:

@mixin discount-title() {
  text-transform: uppercase;
  font-weight: 600;
  line-height: 14px;
  margin-bottom: 10px;
}

.discount {
  @include discount-title();
}

Upvotes: 1

Related Questions