DEV Community

Discussion on: Drying Out CSS Selectors with Sass Maps

Collapse
 
baamenabar profile image
B. Agustín Amenábar Larraín

I just used this pattern last week to generate a bunch of "brand classes". It helps a lot with cleaning verbose files, and makes selectors very consistent.

But be aware that debugging a class generated like this can be tricky, even with sourcemaps.

Do not over use it, or maintenance will be hell for anyone not an expert in Sass.

A usually surround these tricks with thorough documentation in the comments.