Creating or referencing variables dynamically in Sass
This is actually possible to do using SASS maps instead of variables. Here is a quick example: Referencing dynamically: $colors: ( blue: #007dc6, blue-hover: #3da1e0 ); @mixin colorSet($colorName) { color: map-get($colors, $colorName); &:hover { color: map-get($colors, #{$colorName}-hover); } } a { @include colorSet(blue); } Outputs as: a { color:#007dc6 } a:hover { color:#3da1e0 } Creating … Read more