+ 1
Using Mixins in SCSS
I have two mixins, and I want to pass one of the mixins as a parameter for my main mixin is this possible. please help me.
3 Respuestas
+ 1
I don't think you can pass it like that.
You have to have 2 separate @include class for both mixins.
//I might be wrong here, will be waiting for answer from someone who has experience with sass.
0
I did a lot of research and the best option to use it is to use the SCSS extend
0
Inside @mixin can take @include
Eg.
@mixin reset-list {
margin: 0;
padding: 0;
list-style: none;
}
@mixin horizontal-list {
@include reset-list;
li {
display: inline-block;
margin: {
left: -2px;
right: 2em;
}
}
}
nav ul {
@include horizontal-list;
}