Hacker News new | ask | show | jobs
by simooooo 1214 days ago
Interesting, I write CSS and react/js all the time, and I don’t understand a bit of that usage example.
2 comments

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.