Use SASS Mixins to Generate Class Names

If you need to generate a bunch of rules for n number of numbered classes, you can do it dynamically by using mixin arguments to generate class names

Here’s a neat little trick I used recently. I was working with a simple single page form and each page of the form was hidden; I wanted to be able to un-hide the form pages based on a parent class that included the page number.

2 minutes to read