I have a series of color variables for my site that are numbered:
$red-1:
I would like to configure mixin, which calls them dynamically, for example:
@mixin link($color-name) { color: $#{$color-name}-2; &:hover { color: white; background-color: $#{$color-name}-4; } }
However, I cannot figure out how to call variables in this way. (The syntax above does not work.)
(To avoid the obvious assumption: I do not use SASS color functions because my colors are not set by linear changes in saturation or brightness. I cannot programmatically generate them in SASS. The steps are not the same as between a blues that does not match what is indicated for greens, etc.)
source share