3 ms·
One of the reasons that I don't use css preprocessors is actually because it promotes very aggressive de-duplication of code. Keeping code duplication to a min
by robertelder 11y ago
One of the reasons that I don't use css preprocessors is actually because it promotes very aggressive de-duplication of code. Keeping code duplication to a minimum is a healthy practice for any project, but I find that it is usually a pre-mature optimization for a project where the requirements keep changing a lot (which is especially true for we dev projects).
The disadvantage you get with css preprocessors in this case is that you have lots of tight coupling between a large number of concepts, and you're much more likely to subtly break something unrelated by updating your highly generic code. People have cited 'big' projects as being one of the main reasons to use these preprocessors, but more and more, I find that as projects become larger and larger tight coupling becomes a bigger problem. In this case duplicating code can often the solution, and not the problem (because it reduces coupling).
Of course, after you've shipped the feature you should take time to carefully refactor all the duplication into a common location, but companies often don't give you time for this critical last part.