Reputation: 2391
I have a page that has a bunch of Section tags in it and I have a my-5 class on each one. Rather than repeating that every time I'd love to see if I could use a Sass Mixin to apply the my-5 css automatically to the Section tag so I could simply turn this
<section class="my-5">
into this
<section>
Upvotes: 0
Views: 153
Reputation: 362440
You would use SASS @extend
inside the section
rule...
section {
@extend .my-5;
}
https://www.codeply.com/go/6ziZAFqFJj
Upvotes: 2