+ 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.

6th Oct 2020, 11:53 AM
Jack Murimi Kavita
Jack Murimi Kavita - avatar
3 Answers
+ 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.
6th Oct 2020, 12:03 PM
Raj Chhatrala
Raj Chhatrala - avatar
0
I did a lot of research and the best option to use it is to use the SCSS extend
6th Oct 2020, 12:55 PM
Jack Murimi Kavita
Jack Murimi Kavita - avatar
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; }
3rd May 2022, 5:26 AM
CalviŐ˛
CalviŐ˛ - avatar