I have a mixin that accepts an argument that I want to pass into a variable.
@mixin my_mixin($arg) {
background-color: $state-#{$arg}-text;
}
I have a mixin that accepts an argument that I want to pass into a variable.
@mixin my_mixin($arg) {
background-color: $state-#{$arg}-text;
}
Since Sass 3.3 you can use maps also http://blog.sass-lang.com/posts/184094-sass-33-is-released
Here is an example:
It will compile into:
Interpolation of variable names is currently not possible in SASS. Here is the issue that discusses this https://github.com/nex3/sass/issues/626
However, you may use interpolation of placeholders:
This compiles to: