Is it possible to use variable names dynamically in SASS each loop? [duplicate]
问题 This question already has answers here : Creating or referencing variables dynamically in Sass (5 answers) Closed 4 years ago . This is a simplified example. What I'd like to do is use the items in the array to output variable values I've previously created. The syntax below that tries create a variable by concatenating a '$' is obviously wrong but I'm using it to make it clear what I'm trying to do. $puma-width: 100px; $slug-width: 200px; @each $animal in puma, slug { .#{$animal}-title {