|
|
|
|
|
by unculture
1332 days ago
|
|
It’s more like “i.e. shall we inline all our variables” / avoid naming things at all. Adding a name for something is a weighty task that’s orthogonal to the task at hand. If you can avoid the name without losing understandability then it’s a win. The other side of that coin is that if you add a name it has to be worth the effort. In CSS, a number of techniques developed over the years in response to the maintainability challenges of even well thought out, traditional good practice CSS in large projects. These techniques (eg. BEM) required class names for almost every element you need to add styles to. This was to avoid long selectors that a) are hard to understand, even for experienced CSS developers and b) are tightly coupled to and generally not co-located with the HTML. Tailwind gives us away to avoid those having to choose those names, which just took a long time and lots of conversation if you wanted to get them right. Yes, it’s literally in the HTML so it’s coupled, but it’s co-located. The maintenance story is much simpler than with BEM and much much simpler than with trad CSS. Lower effort for a better long term result - it’s a win. |
|
A well thought out class name would have helped understand, that new dev is actuall editing something, that is part of a group of things, which all have something in common.
Naming things is hard, but finding good names is worth gold. Avoiding the hard parts is not going to be the solution to all problems. We would all be working in some kind of modern version of lambda calculus, if naming wasn't important. There are good reasons, why we name things. To convey meaning and convention. Not naming things hides these and makes them implicit, instead of explicit.