I currently have around 50 mixins in my codebase, each generating specific elements. However, I am interested in creating a single mixin that can call any of them based on their name, rather than using a long if statement chain. Is there a method to invoke a mixin by its name? For example:
@mixin getKeyframes($name, $options) {
@include #{$name}($options);
}
Let's say I have a mixin named fadeIn
@mixin fadeIn($options) {
// Implement functionality here
}
Now, I want to utilize the getKeyframes mixin to execute the fadeIn mixin
@include getKeyFrames(fadeIn, true);
Is this approach feasible?