scss

Sometime you have to create a lot of css classes which are basically the same, except for one property (color, size, content, ...). This is an annoying task, but luckily, it can be done with some scss/sass magic. I use the following technique to generate modifier classes, often used for products, iconfonts, etc. Imagine, you're creating a website for a company who sells t-shirts, these t-shirts come in all kinds of colors. Now If you want to change the text-color to match the color of the current t-shirt's color, you could start to create a bunch of classes. .shirt { /* Basic…