Home:ALL Converter>Is it posible to dynamically invoke a mixin in Sass?

Is it posible to dynamically invoke a mixin in Sass?

Ask Time:2020-06-03T02:14:29         Author:H3lltronik

Json Formatter

Is it posible to invoke a mixin doing something like this?

@mixin font-mixin ($mixinName, $color) {
    @include #{$mixinName};
    color: $color;
}

I mean I tried that, it does not work but,is there any way to do something like this? I want to dynamically call a mixin providing the name of the mixin I need to invoke as parameter of another mixin since it will help reducing a lot of code in my project

Author:H3lltronik,eproduced under the CC 4.0 BY-SA copyright license with a link to the original source and this disclaimer.
Link to original article:https://stackoverflow.com/questions/62158652/is-it-posible-to-dynamically-invoke-a-mixin-in-sass
yy