You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
No, you can't use variables to form a name of a mixin to invoke. All contexts where variable interpolation is valid are listed in the docs.
The feature you imagined above is discussed in #1399 among other less or more similar and alternative stuff (in particular there's an opinion that other proposed features would better fit any use-cases you could use this one for).
I will close this one as "expected behaviour". Feel free to re-open though, if you will invent a use-case for this (a use-case where this feature appears as a must have and nothing but this one can resolve it), thus so that we could treat it as a feature request. But meanwhile, since I know your original use-case was http://stackoverflow.com/questions/32665124 (which is much more easy and more straight-forward to be solved with other stuff), closing...
I am trying to create a dynamic mixin name and it throws the error. Refer the below screen shot and code snippet.
@color: #fff;
@A: 2;
.mixin-@{a}(){
color: @color;
}
div{
.mixin-2();
}
How to resolve this issue? Am I missed something ?
The text was updated successfully, but these errors were encountered: