Okey! I have couple of extends in sass like
%heading
%paragraph
%gutter
and so on...
I want to reuse thouse in media queries, but t
No, you can't combine them that way. You'll have to write a mixin that is invoked by your extend class and anything inside of a media query.
@mixin my-extend {
background: yellow;
}
%my-extend {
@include my-extend;
}
.foo {
@extend %my-extend;
}
.bar {
@extend %my-extend;
}
.baz {
@media (min-width: 30em) {
@include my-extend;
}
}
Output:
.foo, .bar {
background: yellow;
}
@media (min-width: 30em) {
.baz {
background: yellow;
}
}