Say you have a set of colors that correspond to class names:
And sometimes those class names recolor a background, but sometimes they might override something else, like a border or text color. Try this mixin on for size:
@each $class, $color in $category-colors
So this call will output subclasses of
.widget.bananas, etc., each with the appropriate text color …
And this one will output subclasses with the appropriate background color (or whatever other attribute you’d like).