Hacker Newsnew | past | comments | ask | show | jobs | submit | paradox460's commentslogin

I call it cargo cult developing. People develop bags of spells and tricks that they attempt to apply to a situation to solve a problem. Usually they can arrive at a solution by trying a number of these incantations, but not always. And never actually ask them what the incantation does

It's not just css either. At a job I've worked, we had a VPN client that would get into a weird state, where it needed to be killed to restart. An incantation that made use of ps, grep, awk, and xargs was provided, instead of just using pkill


It gets worse

Check out the Netlify admin dashboard screenshot in my blog post

https://pdx.su/blog/2023-07-26-tailwind-and-the-death-of-cra...


There's nothing in Tailwind that makes the craftsmanship dead, and your proposed solution with scoped styles somehow a revival of said craftsmanship.

Note how your solution literally depends on a build tool (Vue) to work. Whereas Tailwind can work with no build tools (tailwind build tools removes unused classes, and that's mostly it).

And then you go:

--- start quote ---

Juniors still come along and just do margin: 13px. In tailwind, they do m-[13px]. No difference. At least with CSS its centralized.

--- end quote ---

When your scoped CSS example is literally decentralized per-file CSS that has `margin: 5px` in it. That gets compiled into a meaningless `class-678x8789g` by the build tool.

> The people I've seen who are most excited over tailwind are generally those that would view frontend as something they have to do, not something they want to do.

Tailwind is the product of its era: where even sites are composed out of components. That is, this separation of concerns: https://x.com/simonswiss/status/1664736786671869952

As a comparison, here's Youtube's expertly crafted CSS (which is actually an improvement over their original 6B file). Note how much endless repetition there is: https://www.youtube.com/s/_/ytmainappweb/_/ss/k=ytmainappweb...


Vue, Svelte, and Surface manage to do this without forcing you to inline all your styles

Jumping up and down in the file is not much better and you still need to come up with names for classes. I want to look at an element and immediately know how it's styled.

From Tailwind's home page:

<div class="h-112 p-4 sm:p-8 relative overflow-hidden rounded-lg bg-gray-950/[2.5%] after:pointer-events-none after:absolute after:inset-0 after:rounded-lg after:inset-ring after:inset-ring-gray-950/5 dark:after:inset-ring-white/10 bg-[image:radial-gradient(var(--pattern-fg)_1px,_transparent_0)] bg-[size:10px_10px] bg-fixed [--pattern-fg:var(--color-gray-950)]/5 dark:[--pattern-fg:var(--color-white)]/10">[...]

"immediately" is a stretch


I think your point has very little to do with tailwind and everything to do with CSS. Tailwind is optimized for modification and maintainability. We could replace your example with

<div class="hero-header hero-header--large">...

but now any time we want to modify hero-header, we're trolling through the whole site to find where else these classes might be used so we know what to test to avoid breaking anything

Sure it's easy to look at the element you shared and say it's too complex (it's really not, it's very declarative), but the complexity must live somewhere, and I'd choose Tailwind over any other prevailing system because it's isolated and safe to modify


You can fold it, format it, and IDEs preview it. This is like me posting the equivalent CSS in one big line. But even without all that I still prefer this over dealing with cascading styles in stylesheets. Never again.

dealing with the cascade and tailwind are not the only two options

Thanks for proving the point. I haven’t even seen that element rendered and I already have a good mental picture of what it is and what it looks like.

I worked with both. Scoped styles are nice. Tailwind is better - no naming of every element, no mental tax of jumping around in the file -

I personally wish they'd resurrect elvis

I loved using it to write and browse my html files. It can do troff too <3

Same feeling I get when I see people freaking out about security flaws in smart locks

A burglar isn't going to hack your lock. He's going to smash your door or window and steal whatever he can get his hands on


I believe there's an XKCD about that.

Lutron used it for their integrations platform up til very recently. It was extremely convenient, being able to write little scripts that do things like turn off all the lights

It will probably follow the same pattern as ADAS. Bosch or someone will develop a package, sell it to car manufacturers, and it will become widespread

Why aren't car manufacturers partnering with Comma when they're the closest competitor to Tesla's system? The Bosch systems are super basic.

Remember, we've been in "late stage capitalism" for over 100 years

Yes, but it's fashionable to blame the US for things

I've used Blarg and Honk ever since Red vs Blue carved them into my mind

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: