To make the CSS Selectors dynamic, we can make use if @mixin rules with interpolation.
@mixin is a wonderful rule SassScript has. It allows you to write style rules that can be used throughout your stylesheet — basically it helps to create reusable styles.
Interpolation is nothing but an expression wrapped in #{}.
Here’s how to do it.
Another example:
css selectors dynamic examples sass