Live data from Hacker News

Working with Tailwind CSS every day for 2 years

themosaad.com

11–20 of 215 posts

Re: Working with Tailwind CSS every day for 2 years

#11
post #4

I have been working with HTML since I was 11 — 20ish years. I thought I knew most things. text-decoration-thickness? Nope. I have been adding border-bottom to spans for far too long it looks like.

I started html when I was about 11 so I’m at 25 years.

I just discovered last night there’s an aspect ratio property…

https://caniuse.com/mdn-css_properties_aspect-ratio

Re: Working with Tailwind CSS every day for 2 years

#12
I've been using it regularly for the last 6 months and like it a lot. The blog points out the biggest switching over issues. Converting from rem to px can be annoying if you cant do that math in your head and at first you are often looking up the "simple" tailwinds way to write a css property that you already know.

I pretty much always have the tailwinds docs open and thankfully they are very good and searchable.

It does get a bit wordy when you try to do too much with it though. The nice part is you can always just plop a class in instead of doing everything with tailwinds.

Re: Working with Tailwind CSS every day for 2 years

#13

I'll be honest here, after working with tailwind for 7 months I really hate this piece of tech and really regret picking this company. I thought it wouldn't be a big deal but after seeing unnecessary long walls of class names I'm really tired. Anything other than basic styling is an absolute pain with tailwind and I don't understand why /my company specifically/ can't just use typestyle/styled-components/css modules…

I have the same thought. Bootstrap is still my favorite choice.

Re: Working with Tailwind CSS every day for 2 years

#14
post #4

I have been working with HTML since I was 11 — 20ish years. I thought I knew most things. text-decoration-thickness? Nope. I have been adding border-bottom to spans for far too long it looks like.

I started html when I was about 11 so I’m at 25 years. I just discovered last night there’s an aspect ratio property… https://caniuse.com/mdn-css_properties_aspect-ratio

aspect-ratio is a new standard, so don't feel too bad about that

Re: Working with Tailwind CSS every day for 2 years

#15
Having used Tailwind, once the class lists get large, it inevitably just becomes CSS classes again. My previous role had

    const headerStyles = ["bg-slate-100", "rounded-xl", "p-8" ...]
    ...
    ...
and so on. So at that point, why use Tailwind anymore?

Currently I use Vanilla-Extract, it's like SCSS but uses TypeScript instead of the SCSS language. It also compiles down into native CSS, so there's no runtime overhead like styled-components, emotion, etc.

https://vanilla-extract.style

Re: Working with Tailwind CSS every day for 2 years

#16
post #3

I don't like Tailwind, except for pure layouting where it truly shines. My belief is this: we should think of layouting and styling as two distinct concepts and it doesn't help that CSS is used for both. After years of experimenting with various CSS approaches, I believe using Tailwind for layout and styled-components for styles is the ultimate setup for React applications.

How do you distinguish what is "layout" versus "style"? I know there are some obvious things, but like you said CSS is used for both. So there is a lot "grey area". Especially when "style" can affect the "layout".

Having gray area doesn't mean you can't separate purposes whenever possible (if that's what you want to do.)

Re: Working with Tailwind CSS every day for 2 years

#18
> If I could do it over again I'd just use pixel values, like h-12 is .75rem (which is 12px by default).

(External quote from the maintainer)

Bit of a tangent, but what's the play here? The library is worse than it could be because of this reason. And of course you have adoption and don't want to break people's shit.

Seems like we're missing out on "what could be."

Re: Working with Tailwind CSS every day for 2 years

#19
post #4

I have been working with HTML since I was 11 — 20ish years. I thought I knew most things. text-decoration-thickness? Nope. I have been adding border-bottom to spans for far too long it looks like.

I started html when I was about 11 so I’m at 25 years. I just discovered last night there’s an aspect ratio property… https://caniuse.com/mdn-css_properties_aspect-ratio

It’s pretty new though. Less than 2 years I think.

Re: Working with Tailwind CSS every day for 2 years

#20

Earlier quoted context omitted.

I started html when I was about 11 so I’m at 25 years. I just discovered last night there’s an aspect ratio property… https://caniuse.com/mdn-css_properties_aspect-ratio

It’s pretty new though. Less than 2 years I think.

I was just shocked. Last night I’m like “hmm need to maintain aspect ratio on this box. Maybe I can use calc and vh or something.

And this shocked up in Google. Rocked my world. I wanna go back across a bunch of products I’ve worked on over the years to fix stuff using this!

One of my favourite features now!

Post reply on HN