twitter-bootstrapsasstwitter-bootstrap-rails

How to reuse a class in sass without using a mixin?


I want all my anchors in my application look like .btn (Twitter Bootstrap class), is there a way to make this?

I did

a{
  @include btn;
}

but it does not work because btn should be a mixin, and it's a Twitter Bootstrap class.


Solution

  • You want to use @extend .btn; - @extend allows you to inherit all the properties of a selector without having to define it as a mixin.