Mixins can be passed a block of SASS compliant code, which then becomes available within the mixin as the @content
directive.
@mixin small-screen {
@media screen and (min-width: 800px;) {
@content;
}
}
@include small-screen {
.container {
width: 600px;
}
}
And this would output:
@media screen and (min-width: 800px;) {
.container {
width: 600px;
}
}
Mixins can use the @content
directive and still accept parameters.
@mixin small-screen($offset) {...