News for hackers. Stuff that matters.
Re:Tailwind CSS v3.3 by hoofhearted on Wednesday March 29, 2023 @09:51AM (#35357278)
I posted your thoughts on the Tailwind chat. I’m trying to push Adam or one of the other leads to come on and post a proper response.

I completely disagree with your opinion, as well as numerous other Tailwind developers lol.

Your opinion of Tailwind is kind of the like what the person who may have believed the flat head screw was the way when they introduced the Phillips head screw. Both types of screws are great tools, but a Phillips head may have seemed less superior to you because you didn’t understand its purpose and value.

Re:Tailwind CSS v3.3 by emmacharp on Wednesday March 29, 2023 @09:56AM (#35357340)
That's great! I'd love to have a proper response as you say.

As for your analogy, I'm not convinced it's adequate. The Phillips screwdriver does not reinvent the way to turn screws as Tailwind does here with styles. The Phillips screwdriver does not add complexity in the building of houses.

Re:Tailwind CSS v3.3 by hoofhearted on Wednesday March 29, 2023 @10:11AM (#35357547)
They aren’t reinventing the way you write styles. Tailwind is actually just a CSS design token and utility class library at its core. It’s the Bootstrap of the 2020’s.

Regarding design tokens, they are taking notes from 1996, and they realized that it is much more computational efficient to describe your component visually with inline styles compared to loading separate style sheets.

Tailwind and CSS design tokens in general make it easier to make smart, efficient choices from curated palettes. Design tokens also create a common language for everyone who uses Tailwind - both across teams and across projects, which can break down communication barriers in large scale projects.

Re:Tailwind CSS v3.3 by emmacharp on Wednesday March 29, 2023 @10:28AM (#35357796)
I agree wholeheartedly about design tokens. I use this in every project, always. But I only need custom properties, nothing else. And I get all the advantages you're describing.

And I'd say that striping the cascade, removing selection and specificity and implementing new ways to do the same things (ie: peer-[:nth-of-type(3)_&]:block) is indeed reinventing our use of CSS.

Re:Tailwind CSS v3.3 by pcthrowaway on Wednesday March 29, 2023 @12:05PM (#35359211)
If you name your own tokens, then other people coming to the project have to learn to apply the same set of tokens correctly, and may even end up reinventing the same ones with new names. In fact, you might even do that (well, it sounds like you might not, but I certainly would, and have)

Tailwind is just that, but unified across all projects, with better tooling (VS code integration, tree shaking, lighter css files)

Re:Tailwind CSS v3.3 by hoofhearted on Wednesday March 29, 2023 @03:01PM (#35361684)
PC, is that you?

I’ve been working towards emailing you to ask if I could upgrade patrickcollison.com

Re:Tailwind CSS v3.3 by pcthrowaway on Wednesday March 29, 2023 @03:12PM (#35361844)
Since this is an anon account, I have a policy of neither confirming nor denying being any person, real or fictional.
Re:Tailwind CSS v3.3 by emmacharp on Wednesday March 29, 2023 @04:01PM (#35362579)
You can use the same standardized nomenclature in CSS if you want it to be "compatible" with Tailwind. Nothing wrong here.
Re:Tailwind CSS v3.3 by hoofhearted on Wednesday March 29, 2023 @03:07PM (#35361761)
So this is where Tailwind comes into play. With TW, you don’t need to any custom properties. They include base stylings and preflight styles that fix and reset just about any browser quirk or bug. The end result is a consistent styles that look and function exactly the same on any device or browser.

There are hundreds of little tiny css style rules and fixes for a perfect website, and you have to remember them all. Tailwind has done all of that, plus a bunch of more.

Their utility classes are their biggest feature in my opinion. Just the ability to set dark mode styles inline with my light mode styles seal the deal for me alone.

Re:Tailwind CSS v3.3 by emmacharp on Wednesday March 29, 2023 @03:58PM (#35362538)
Again, I agree the base stylings etc. I do the same in each of my project using pure CSS specifically because I don't want to remember them all.

So I have all the same kind of files, and change the design tokens accordingly. The only difference is I configure in CSS whereas you configure in JS. You can bundle it all and keep reusing the same files as you would do in Tailwind.

Re:Tailwind CSS v3.3 by hoofhearted on Wednesday March 29, 2023 @05:28PM (#35363982)
Yeah, it’s pretty much the same difference.

For someone starting a brand new app from scratch, they might want to lean on existing css design token libraries.

Design tokens aren’t anything new; Bootstrap has been using them for margin for years. mr-1 mt-2

Re:Tailwind CSS v3.3 by hoofhearted on Wednesday March 29, 2023 @10:13AM (#35357569)
Your thoughts kind of remind of Brandon M’s lol.

https://news.ycombinator.com/item?id=9224