Sass: Using two @each lists in SCSS
In my CSS I have to create classes that make reference to a 'hair colour' and 'hairstyle' I have written a mixin to help make my CSS writing more efficient: @mixin hair($hair, $colour) { .hair-#{$colour} .#{$hair} { background:image-url("xsppsfhair#{$hair}#{$colour}.svg") center top no-repeat, image-url("xsppsheadgrey.svg") center top no-repeat, image-url("xsppsbhair#{$hair}#{$colour}.svg") center top no-repeat; } } @include hair(spikyboy, blonde); @include hair(curlyafroboy, blonde); This produces the following CSS .hair-blonde .spikyboy { background: url('../images/xsppsfhairspikyboyblonde