Use the #{$...}
syntax to escape the SASS variables.
$name: 'wonderful';
.prefix-#{$name}-sufix {
// ...
}
@for $i from 0 through 1 {
// ...
}
$my-map: (0: 'hello', 1: 'you');
@for $i from 0 through length($my-map) {
content: map_get($my-map, $i);
}