Live data from Hacker News

Working with Tailwind CSS every day for 2 years

themosaad.com

151–160 of 215 posts

Re: Working with Tailwind CSS every day for 2 years

#151
post #62

I haven’t seen it mentioned in this thread but for those who like Tailwind in theory but hate all it’s drawbacks you might be interested in Open Props ( https://open-props.style/ ) which is put together by a member of Chrome’s devrel team. The first 10 minutes or so of this video is also a decent introduction it seems which will help put this project into context for you so you can see specifically what kinds of prob…

I've been looking for someone to mention open-props and I really enjoy using it.

Re: Working with Tailwind CSS every day for 2 years

#152
post #50

Earlier quoted context omitted.

I really don't get the "tailwind is for beginners" opinion I see parroted so much. It doesn't enable you to do anything that CSS didn't already do. It's just a different way of writing it. Knowing CSS is a prerequisite to being able to use Tailwind. "Tailwind is for beginners" just sounds to me like "I don't like this thing because I'm too smart for it"

Because Tailwind is often suggested as a way for novices to implement design without having to really learn CSS. Simultaneously, allows people who don't care at all for CSS or design to create something functional. Tailwind does not require knowing CSS. It'll get you around tailwind faster if you do know it, but you do not have to care about what Tailwind is really up to when adding "outline outline-2 p-4 outline-off…

Being bad at CSS is certainly why I love it. But that doesn't mean it's not a great tool for experienced frontend developers as well.

Re: Working with Tailwind CSS every day for 2 years

#153

Earlier quoted context omitted.

> It's loved by novices and those who don't know what they're doing, almost exclusively. They claim they know CSS, but will fail after any casual test. This is an incredibly silly take. As a senior frontend dev with almost 20 years of experience and a solid resume, I will take Tailwind over anything else in most cases. Obviously there is always exceptions based on the project needs, but to have such a hard take like…

I've been doing front-end development in some capacity almost as long as you, but it's not my forte. I've looked at Tailwind and I can see its value as a way to quickly prototype, but it also looks to violate the deeply instilled belief I have about semantically named classes. I know front-end development has changed its set of best practices several times now. We went from unobtrusive JS and semantic class names to…

Semantically named classes is a lot of effort to come up with, and don't really help much. One of the big selling points is that you can quickly style things without having to name every HTML element.

Re: Working with Tailwind CSS every day for 2 years

#154
post #31

Having used both Tailwind and a more traditional scss system in the past. I think my personal favorite is styled components[0]. It strikes a good balance between not having to move between many files, like you might find your self doing with traditional css/scss system. While being declarative and semantically easy to read. It is not perfect by any means, and in larger components/pages it can lead to some pretty long…

You could combine styled-components/emotion with something like open-props[0]. You get all the power that comes with CSS and a set of variables to help you create a consistent design. That's how I manage my styling.

[0] https://open-props.style

Re: Working with Tailwind CSS every day for 2 years

#155

Earlier quoted context omitted.

Nope, it saves me (a) keystrokes and (b) design effort. The restricted subset of color options, for example, lets me use a predictable color system out of the box without having to think about it. It's not about removing "complexity" in the sense of understanding how CSS works.

With a stylesheet you have the styles in one place, with Tailwind you repeat it on every element. Yes components and copy/paste are a thing but I'd be very surprised if you're having to manage less style code with Tailwind. As for design effort, setup a few primary/secondary accent colors as global variables.

Not exactly - with Tailwind you aren't repeating the design decision, only the scalar value. So `border-2` might mean a border width of 4px or 6px or whatever, but that's the design decision that is encapsulated within the theme configuration.

Re: Working with Tailwind CSS every day for 2 years

#156
post #42

Earlier quoted context omitted.

I don’t think you realize that there are a lot of old school developers such as myself (going +25 years) who’s simply looking for quick and dirty front end tools that simply work and get out of the way. Tailwind does exactly that.

I'm in the same boat, and Tailwind looks like something that would get in my way (or at least becoming annoying very quickly.) I don't want the equivalent of inline styles all over the place.

This is probably the main thing that puts people in one camp or the other.

Before Tailwind came along I very often found myself just wanting to put some inline styling in various places. It's so much easier to just add some CSS to an element than having to think of a class name, think of where the best place would be to put the class, etc.

Re: Working with Tailwind CSS every day for 2 years

#157
post #40

I hate Tailwind with the passion of a million suns. It's loved by novices and those who don't know what they're doing, almost exclusively. They claim they know CSS, but will fail after any casual test. The best arguments against it: 1. Spamming utility classes causes horrible git commits, git history, git difference checks; 2. Conflicting utility classes aren't clear, and sometimes the order cannot be trusted; 3. Rep…

My best argument against it is whatever the learning curve, you're better served just spending that time learning to write CSS instead.

Hard disagree on that one. You can learn Tailwind in an evening.

Re: Working with Tailwind CSS every day for 2 years

#158

Earlier quoted context omitted.

My understanding of CSS has gotten a lot better from using Tailwind.

This has been my experience as well. Tailwind is a good pair of support wheels, but it gets annoying after a while, and is difficult to maintain long-term.

What make it difficult to main long term for you?

Re: Working with Tailwind CSS every day for 2 years

#159

Oh two tailwind hate threads today instead of the usual one at a time? Everyone as usual saying "long class lists" even though the literal home page tells you not to do this and to make components or partial views or whatever your tool of choice calls it. At least be inventive and follow the instructions before you start blaming something.

If everyone using a tool is using it wrong, it’s a poorly designed tool

[deleted]

Re: Working with Tailwind CSS every day for 2 years

#160

Earlier quoted context omitted.

If everyone using a tool is using it wrong, it’s a poorly designed tool

Everybody isn’t though, just the people who are complaining.

Some people would rather learn every CSS rule than spend 10 minutes reading the Tailwind docs.
Post reply on HN