Live data from Hacker News

Why Tailwind CSS Won

matt-rickard.com

391–400 of 559 posts

Re: Why Tailwind CSS Won

#391
post #374

Earlier quoted context omitted.

There are two different things people could be referring to when they mention the "cascade". One is CSS style inheritance. So if I do this: hello world The `text-blue-500` style is going to cascade down to the descendent elements. That's just how CSS works and there's no getting around it. The other usage of the term applies to a style of writing CSS that makes use of this cascade. So something like this: .card { col…

I mean, the top just happens because color has 'inherit' by default. The latter is specificity, and normally what I think of when I hear "cascading". But, it turns out that isn't cascading either [0]. Cascading refers to the order stylesheets have priority when loaded by the browser. Going to have to update my definitions for the future. I always thought cascading referred to how specificity worked. Edit: no wait, sp…

>But, it turns out that isn't cascading either

The order in which stylesheets are loaded and it's origin is just part of the cascading algorithm. See the "Cascading order" section https://developer.mozilla.org/en-US/docs/Web/CSS/Cascade#cas...

Re: Why Tailwind CSS Won

#392
post #156

Earlier quoted context omitted.

> You're not learning anything valuable by learning Tailwind. 1. You need to know CSS to use Tailwind 2. I learned and understood quite a few of things I rarely use thanks to Tailwind's amazing docs. Docs that are non-existent for CSS 3. I'm reasonably good with CSS, but I could never come up with a consistent and minimal design system that Tailwind offers That said, to things everyone should read to up their CSS gam…

Care to show one simple example where tailwind's amazing docs cover something MDN or css tricks and others do not?

MDN's docs are amazing, but they are about everything. "CSS tricks" is not documentation (except some very helpful articles).

Meanwhile in Tailwind everything is grouped together, can be searched quickly and acts both as quick docs [1] and as quick reference [2].

I personally have become proficient with flexbox by playing with Tailwind classes.

[1] E.g. layouts https://tailwindcss.com/docs/display

[2] E.g. all the justify-content values https://tailwindcss.com/docs/justify-content

Re: Why Tailwind CSS Won

#393

Earlier quoted context omitted.

Missed the underlying point but I'll make it explicit - if a plugin is "needed" that is also a red flag for me.

I suspect the number of developers with zero plugins in their IDE of choice is vanishingly small. That said, it's not needed . It's just a quality-of-life improvement, like most other IDE features. You can write a Tailwind site in Notepad, if you prefer.

[deleted]

Re: Why Tailwind CSS Won

#394
Folks, while we are at it, what is the best way to learn proper front end for a hobbyst? I'm a decent programmer and work with databases and backend technologies. I want to be able to build simple front ends for the stuff I work on. I've been meaning to dive into D3, but the tutorials for basic front end stuff assume I'm really starting from scratch. But what I'm blocked by is 1) what is a nice workflow for development 2) how can I build effective frontend 3) how to setup everything.

Re: Why Tailwind CSS Won

#395

Earlier quoted context omitted.

And for those that prefer a different editor? Just saying, if a tool then pushes you into another specific tool for maximum efficiency using it, that alone gives me pause.

> And for those that prefer a different editor? A plugin is likely available for that, too. I use PHPStorm a lot; https://www.jetbrains.com/help/phpstorm/tailwind-css.html Panic's Nova? https://extensions.panic.com/extensions/jasonplatts/jasonpla... Vim? https://vimawesome.com/plugin/coc-tailwindcss etc.

If I made a hammer but you need a special glove to use it proficiently, then I didn’t make a very good hammer

Re: Why Tailwind CSS Won

#396
post #266

Earlier quoted context omitted.

Could you explain the performance problem ? I understand how you could get to the other claims, even if i disagree. But i sincerely do not understand the performance one. If anything tailwind approach is mostly really good for performance, as rendering utility class directly on the element is still the fastest, by far, technique. The only slight call here could be shadow dom scoped but that necessitate declarative sh…

You haven't missed anything. I swear, every time I read a thread on here about Tailwind I feel like I'm taking crazy pills. So far I've heard: 1. Tailwind allows you to not learn CSS (not even remotely true) 2. Tailwind is hard to move away from (what?!) 3. Tailwind has performance issues (lol)

something something 3rd party dependencies bad for (?) reasons

Re: Why Tailwind CSS Won

#397
post #372

Earlier quoted context omitted.

If you don't know how the lower level layers under your current abstraction work, you end up on accidentally quadratic. Am I more clear now?

Do you know how Tailwind works? What you say is generally true, but I don't really see how it applies to TW...

No of course I don't. And due to javascript's reputation, I assumed. Because what I said IS generally true for the js bubble.

The sad part is i don't even feel guilty for assuming, because this area of programming has a well deserved reputation.

Even if this thing doesn't use javascript, can you guarantee the generated CSS doesn't put the browser's layout engine in an infinite loop or something? Especially without knowing CSS, like the OP suggested it's normal?

Re: Why Tailwind CSS Won

#398
post #338
post #140

Gray beard's 5c: Tailwind is a farce and a catastrophe. It's as modern as the style parameter is, and it's as reusable as a moving a dirt pile from one corner to the next. You're not learning anything valuable by learning Tailwind. Learn CSS, that will stick with you for the next 20 years. It amuses me when a library is implemented 'with tailwind', which means it's totally useless to the people _not using tailwind_,…

I've been using CSS since 1997. CSS was basically a shit show for its first 20 years thanks to all the slightly differing browser implementations. I will tell you, that is what stuck with me. Tailwind is a massive improvement in terms of maintainability across teams and tooling. Thanks to Tailwind my team hasn't had to think about CSS resets and browser shims for over 5 years now, and any bugs where an application lo…

Except if you bundle your styling with the component, like you should be doing with React or Vue, and you have two _maybe_ three over-arching foundational style directives being implemented across your build, you do not need Tailwind.

I believe both React and Vue have the capability to scope your CSS along with the components. Modular CSS has been much easier to maintain over years than fixing when Tailwind updates or finding (again) that one !important that happens to conflict with a new released component set.

I save my teams time and money by applying CSS in the manner that it should be; which means not as an inline style mechanic.

Re: Why Tailwind CSS Won

#399

Earlier quoted context omitted.

I think Tailwind could be made good for usage at enterprise scale, for example, as a customisable foundation for a branded design system. If for example Figma offered first-class support for Tailwind-like utility classes in the form of a modernised "styles" or "composite tokens" feature, then mapping from a design system to Tailwind-based code could be pretty simple. But right now, it's anything but. In my experience…

How's any of that unique to Tailwind?

[deleted]

Re: Why Tailwind CSS Won

#400
post #140

Gray beard's 5c: Tailwind is a farce and a catastrophe. It's as modern as the style parameter is, and it's as reusable as a moving a dirt pile from one corner to the next. You're not learning anything valuable by learning Tailwind. Learn CSS, that will stick with you for the next 20 years. It amuses me when a library is implemented 'with tailwind', which means it's totally useless to the people _not using tailwind_,…

> It's as modern as the style parameter is, and it's as reusable as a moving a dirt pile from one corner to the next. For most uses, the only thing really wrong with the style attribute is the lack of breakpoints for responsive layouts.

And pseudo selectors like hover, and animations. If these problems were solved in css style tags, I’m not really sure tailwind would have much to offer. It’s basically inline styles as class names
Post reply on HN