Hacker News new | ask | show | jobs
by BoorishBears 1214 days ago
I don't write CSS (normally) and yet I understand every single statement, and can easily find which statement I'd need to change for a given. It's that simple.

You could argue "well you should learn CSS!" but at the end of the day, I don't need CSS often enough to want to bother. Frameworks like TailwindCSS have been great for people like me.

-

Also you went and dug into its guts to find the implementation details, the actual usage is nowhere near that complicated: https://github.com/konstaui/konsta/blob/master/kitchen-sink/...

I can't even imagine what raw CSS lovecraftian horror captures all of the corner cases the classes you linked are hiding away from me (and to be clear, I'd rather not know or care)

2 comments

Interesting, I write CSS and react/js all the time, and I don’t understand a bit of that usage example.
I mean taking some random statements from a shorter line:

"uppercase" => "text-transform: uppercase;"

"duration-100" => "transition-duration: 100ms;"

"px-2" => "padding-left: 0.5rem; padding-right: 0.5rem;"

For someone who knows CSS I don't see it as a big downgrade in readability?

But for someone like me, the right side of that equation isn't something I could go around writing in my HTML, the left form is.

Even if all it's doing is acting as a short form for CSS that allows me to do a "no-no" and embed CSS in my markup, it enables me to be infinitely more productive in CSS than I've ever been.

-

And the reality is, if one day I work on a product that's so cursed with success that breaking that encapsulation starts to bite me:

a) It's rare there won't be a lot about the design that has to change anyways

b) I can hire/pay people who do this stuff for a living.

And in the meantime I'll still get a ton of value from it

Tailwind may not be targeted towards you. For me, it was a solution to many of my CSS problems. However, I'm not an expert in CSS, and I can recognize that for someone who already has extensive experience with CSS, it might just appear as a complex abstraction.
Also, you can find a lot of Tailwind templates/components and they just work. You don't have to worry about a snippet clashing with or overwriting some other CSS you have like you would with plain HTML/CSS snippets.

Sure, HTML looks uglier when I add a dozen classes to an element instead of adding one class with a dozen of CSS rules, but I'm more than willing to accept that as a compromise.

Overall, Tailwind made frontend design more accessible to me than it ever was, and I never have to use `!important` again.

I find that some people are upset by the "democratization" aspect of this honestly.

It usually comes out as commentary along the lines of "well what's so hard about learning when to use !important?", "that tells me your CSS is poorly organized"... or sometimes just a drive-by downvote

In my experience that comes from a misguided idea that people who jump at it are somehow uncurious, or irresponsible, for "wanting the sausage without learning how it's made" and not caring anything at all about the craft.

-

I don't know if it occurs to them that there are some of us who have our hands in so many pies that, regardless of will or want, there is simply no more time for more pies:

The last time I picked up CSS, it was to write a static page to serve as a control interface for firmware I wrote for an MCU, for accessing an API engine I had just written for said MCU, embedded in a circuit design I had created and hand assembled, which was in turn embedded in a stepper actuated 3d printed assembly I had designed and printed. And all that was in a weekend: the last thing on earth I had time for at the end of it was figuring out what the idiomatic CSS way to style some buttons was...

The fact is, I get it: I am able to appreciate craft, and I understand how so casually throwing best practices to the wind "because it's easy" could come across as offensive. But at the end of the day, sometimes it really doesn't matter how the sausage gets made as long as it gets made.

100% agree, in fact my comment got a couple of those drive-by downvotes. The closest equivalence I can think of in my line of work as a sysadmin is me being upset that non-sysadmins can run things with `docker-compose up -d`.

I'm not. I have no interest in learning more, same way as frontend developers have no interest in learning to build custom Dockerfiles or Kubernetes deployments. It's not that it's difficult to pick up, we just can't be bothered to. People that do frontend just want their things to run, and I just want to be able to make a website that doesn't look like shit without spending a ridiculous amount of time on it.

Anything that bridges these gaps is a win in my book. Tailwind is better than Bootstrap (granted, it's been years since I've last tried it), better than drag-and-drop website builders, worse than pure CSS if you know what you're doing. It won't make your job obsolete, it just makes things easier for the rest of us. Same goes for docker-compose.