I would like to keep my sass code short.
instead of
@mixin tg($font-size,$line-height) {
something related to font-size and line-height
}
@mixin h1 {
@include tg
}
@mixin h2 {
@include tg
}
....
How can i create a @mixin lib with loop?
$typography-list: h1, h2......
@mixin tg($font-size,$line-height) {
something related to font-size and line-height
}
@each $typography in $typography-list {
create @mixin {
@include tg()
}
}
if so, what is the best way of doing it?