|
|
|
|
|
by ramesh31
1694 days ago
|
|
Utility classes are an absolute nightmare. I get that for people who can't or don't want to put in the time to master CSS that they can seem really useful at first. But they are a total headache for long term maintenance. By loading up the classname attribute on an element with tons of utility class names, you are defacto creating a new class that is equivalent to the hash of all those names. You're better off just creating the class in the first place and giving it the properties it needs. Maybe use SASS mixins if you really want code reuse in your CSS that badly. But the next developer who comes in to debug a component now has to learn an entire design system and the intricacies of how the 10 different classes you've applied all work together, instead of just looking up the class definition and fixing the issue. |
|