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.
@mixin is used to group css code that has to be reused a no of times. Whereas the @extend is used in SASS to inherit(share) the properties from another css selector. @extend is most useful when the elements are almost same or identical. The main difference between the two is in their compiled CSS file.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With