Live data from Hacker News

Why Tailwind CSS Won

matt-rickard.com

541–550 of 559 posts

Re: Why Tailwind CSS Won

#541

Earlier quoted context omitted.

Not really. Tailwind lets you configure your own spacing and breakpoints. You get to pick what those numbers mean.

That's just a CSS variable. You don't need Tailwind for that.

They are CJS modules or (ideally) Typescript. CSS custom properties (variables) are slightly different.

    import type { Config } from 'tailwindcss'
    
    export default {
      content: [],
      theme: {
        extend: {},
      },
      plugins: [],
    } satisfies Config
(not arguing for or against TW here)

Re: Why Tailwind CSS Won

#542
post #348

Earlier quoted context omitted.

Tailwind advocates don’t maintain their code, they just hop between companies and leave the disaster behind for someone else to deal with.

This is nonsense. You can't substantiate this, and you should avoid making such sweeping generalizations. It adds nothing to the conversation.

Zealotry on display. How do you know I haven’t inherited a mess of tailwind before?

Re: Why Tailwind CSS Won

#543
post #380
post #189

Earlier quoted context omitted.

And you write this crap `class="my-4 mb-sm-5 mb-lg-6"`hundreds of times in complex applications or `class="foo"`?

Do you practice atomic design? It shouldn't be an issue for you if you do

I love tech’s endless fixes for self-induced problems.

Re: Why Tailwind CSS Won

#544

Earlier quoted context omitted.

I just end up context switching to their documentation website to find the syntax they used. I don't, but I've been using Tailwind for a little while. Once you grok the syntax structure it's not that different to writing CSS.

If it's not that different, then you may as well just write CSS.

Maintaining is a different story and that is where Tailwind shines.

Re: Why Tailwind CSS Won

#545

Earlier quoted context omitted.

If it's not that different, then you may as well just write CSS.

Maintaining is a different story and that is where Tailwind shines.

Maintainability is of course subjective.

Personally, I think this code looks like utter shit, and I definitely would not wish to maintain this.

    Product
    Features
    Marketplace
    Company
This isn't a pathological example constructed to undermine Tailwind either — this code is copied and pasted from their website.

Re: Why Tailwind CSS Won

#546

Earlier quoted context omitted.

I'm not sure I fully agree with your view on what tailwind is and why it is growing. In my opinion, tailwind is gaining some popularity because some people find it faster and easier to use than writing traditional CSS files. I realise it also has some downsides, and seeing all those class names in the html is particularly ugly, but if the people using it got their project out faster, then surely there is a place for…

Technology choices, and life's choices in general are like a spectrogram of different wavelengths with positive and negative values... Like "this will help you today, but bite you in the rear tomorrow", or "this will help you tomorrow, but be annoying today". And it also varies by different conditional developments, if this happens, if that happens, can you implement a change, or the solution is "write-only" and so o…

"Ship faster, do less, faster, faster, faster. To what end?"

You're on hacker news, which is pretty heavily focused on startups. Startups usually have a limited runway, wherein if they don't deliver they cease to exist. That seems like a pretty reason to ship faster?

Comparing "choose a framework that saves developer time and energy" to "choose porn over your family" seems a bit much.

Re: Why Tailwind CSS Won

#547
post #483

Earlier quoted context omitted.

Reading the bloated HTML when using Tailwind is less painful than dealing with all the cascading crap of CSS.

CSS cascades whether you use Tailwind or not.

This isn't correct. Tailwind removes all the cascading. And it is liberating.

All cascading styles are removed, so if you pull in a component you have already built on your site, it will be styled identically in the new location too.

Re: Why Tailwind CSS Won

#548

Earlier quoted context omitted.

Well, that means stylelint has a problem. They should be talking about how to solve it, because nobody wants to not enable debuging information on a develoepr build. If the devs do not acknowledge this as a problem, this means stylelint is a bad piece of software. I really dislike sass the way it's normally used. It was once a necessary hack, but it's mostly not useful anymore. Something that just concatenates your C…

I'm not sure what you mean about "Stylelint having a problem". There's a default config, with only base rules, without the more opinionated ones. Then you configure/extend it as you would with almost any other tool. Isn't it the way most tools of this kind work? Or am I missing something?

Linters default rules define almost completely how they will be used. It doesn't matter if you think this is reasonable or not.

IMO, missing some rules is better than what most tools of this kind do, but something as plain and obvious as "did you enable debugging symbols on the development build?" should be there. And most people will blame the tool if it's missing.

Re: Why Tailwind CSS Won

#549

Earlier quoted context omitted.

Yes, I have. And I don't see how it can impact the feasibility and easiness of activating source maps. I may be wrong, though. Don't hesitate to correct me if that's the case.

I'm not particularly interested in arguing the specifics of a solution, my point is that on a larger team especially where an individual does not get to define the approach, I'm surprised that you haven't run into issues with context switching or hunting. But regarding one of your specifics, for example you said "the kind of help/solution that should be implemented first" before frameworks are added. On the teams you…

Well, I'd say yes, we welcomed and considered any proposition made by our team members, junior or not. The CTO makes the final decision. But if it's a good idea, it'll be included in the workflow, yes. Source maps would be a good example of this. And it's not hard to include in my experience, even more when considering the added value.

And, yes, I've had problems in the past with hunting rules as you say. But it's been a good long while since it happened.

Re: Why Tailwind CSS Won

#550

Earlier quoted context omitted.

I'm not sure what you mean about "Stylelint having a problem". There's a default config, with only base rules, without the more opinionated ones. Then you configure/extend it as you would with almost any other tool. Isn't it the way most tools of this kind work? Or am I missing something?

Linters default rules define almost completely how they will be used. It doesn't matter if you think this is reasonable or not. IMO, missing some rules is better than what most tools of this kind do, but something as plain and obvious as "did you enable debugging symbols on the development build?" should be there. And most people will blame the tool if it's missing.

Sorry if I'm being obtuse but I still don't understand.

As I see it, the problem was one of SASS code architecture. What do you mean then by "enable debugging symbols"? How does that solve the "chaotic file architecture" problem?

Post reply on HN