News for hackers. Stuff that matters.
Re:Tailwind and the Beauty of Ugly Code by troupo on Friday July 07, 2023 @01:33AM (#36627607)
> 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?

Re:Tailwind and the Beauty of Ugly Code by imilk on Friday July 07, 2023 @01:36AM (#36627622)
Oh 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.
Re:Tailwind and the Beauty of Ugly Code by Cyberdog on Friday July 07, 2023 @06:25AM (#36629664)
No, that sounds like a tangental problem born of inexperienced developers and/or poor communication.
Re:Tailwind and the Beauty of Ugly Code by imilk on Friday July 07, 2023 @01:23PM (#36635129)
There 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.
Re:Tailwind and the Beauty of Ugly Code by Cyberdog on Friday July 07, 2023 @06:24PM (#36639071)
Sure. That's not a problem exclusive to CSS, though, and I don't see how it's one fixed by allowing bad coding practices.
Re:Tailwind and the Beauty of Ugly Code by troupo on Friday July 07, 2023 @01:40PM (#36635382)
> 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.

Re:Tailwind and the Beauty of Ugly Code by cxr on Friday July 07, 2023 @07:55AM (#36630336)
Proper classes would appear rather more like `class="secondary sticky container hero-text"`* in the markup. So no.

* or `hero text`, even (sans hyphen)

Re:Tailwind and the Beauty of Ugly Code by imilk on Friday July 07, 2023 @01:20PM (#36635071)
Have 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.
Re:Tailwind and the Beauty of Ugly Code by troupo on Friday July 07, 2023 @01:40PM (#36635394)
As I replied in a sibling comment: https://news.ycombinator.com/item?id=36635382