I have this:

As you can see I currently have a conditional to include the button style mixins, is there anyway I can automagically include one? For example:
@mixin button($color)
@include button-#{$color}
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Seeing your markup above, I’m assuming you’ve tried interpolation already and it din’t work. Just a thought – wouldn’t an extend be more appropriate in this context? i.e. extend individual
button-*mixins with a certain roundedness.That being said, you already have the button
$colorparametrized, but you are taking a step back by adding an extra level of complexity of having a pre-defined mixin included depending on the variable value! I’m assuming that you’ve started withbutton-blue…button-treemixins, and then a requirement came up needing a$circletoggle?If you are, in fact, using
button-blue…button-treeoutside of thebuttonmixin, I’d say it would be most maintainable to have the “multiple ifs” switch logic abstracted once to a function directive like