I have a small question about @content in sass
I still not understand well how to use it, like I did read content is if you want use a mixin and insert something else there.
My question is: why I need use @content if works whithout?
my example:
@mixin context--alternate-template {
margin: 0;
font-size: 14px;
}
.content-sample {
@import context--alternate-template;
background-color: black;
}
output css:
.content-sample {
margin: 0;
font-size: 14px;
background-color: black;
}
sample I a saw on web:
@mixin context--alternate-template {
margin: 0;
font-size: 14px;
@content
}
.content-sample {
@import context--alternate-template;
background-color: black;
}
output css:
.content-sample {
margin: 0;
font-size: 14px;
background-color: black;
}
so yes why I need insert @content in the mixin if works whithout.