In nearly every project I’ve worked on, patterns develop throughout the css. That’s when I turn to Sass to simplify my stylesheets (hello whitespace, nesting, and mix-ins).
@while loops to simplify pattern-making. The Sass Way talks about this in a bit more detail. Here’s an example of
It’s a simple way to reduce repetitive css. Pretty neat, eh?