3 ms·
> it pulls you out of the habit of using proper classes and such What's "proper classes and such"? You mean hundreds of increasingly specific and non-reusable
by troupo 3y ago
> it pulls you out of the habit of using proper classes and such
What's "proper classes and such"? You mean hundreds of increasingly specific and non-reusable BEM abominations like `.hero-text__sticky-container--secondary` that no one remembers and creates new ones?
- imilk 3y agoOh the joys on having to edit a website that was made (by myself or someone else) years ago before Tailwind. It takes at least a few hours to figure out exactly what all these class names actually do, and you are still never sure that there isn't some random lines in the CSS files that will prevent the style from changing like you hoped.
- Cyberdog 3y agoNo, that sounds like a tangental problem born of inexperienced developers and/or poor communication.
- imilk 3y agoThere are many, many, many cases where communication is not possible because who is working on the code now didn't exist when it was written (unless you want to take the time to document out all of your CSS and hope that everyone who touches it follows that documentation exactly). A new team taking over, a new agency updating a website for a client that was made by another agency, a new developer being brought on, etc.
- Cyberdog 3y agoSure. That's not a problem exclusive to CSS, though, and I don't see how it's one fixed by allowing bad coding practices.
- troupo 3y ago> No, that sounds like a tangental problem born of inexperienced developers and/or poor communication. I've yet to see a single project to not devolve into a mess of class names. Not only that, but a mess of class names with significantly repeating boilerplate, intimately tied to specific elements.
- cxr 3y agoProper classes would appear rather more like `class="secondary sticky container hero-text"`* in the markup. So no. * or `hero text`, even (sans hyphen)
- imilk 3y agoHave you ever jumped in on a project with hundreds of "secondary sticky container hero-text" all over the code base? It is a woeful few hours (at least, maybe day or two) of cross-referencing all of these "semantic" class names to their definitions in CSS, and even then you are never truly sure if there is another rule overwriting your changes somewhere else in the CSS. And good luck if more than one developer has touched the code since you last saw it.
- troupo 3y agoAs I replied in a sibling comment: https://news.ycombinator.com/item?id=36635382 https://news.ycombinator.com/item?id=36635382
- deleted 3y ago[deleted]