Live data from Hacker News

Tailwind CSS v4.0

tailwindcss.com

91–100 of 296 posts

Re: Tailwind CSS v4.0

#91
post #84

Earlier quoted context omitted.

It's worse. React killed the craft of design engineering because everything is JavaScript. CSS develoeprs are gone.

Design engineers still exist, they just write more JS these days. They are still building UI and design systems and teaching craft & supporting full stack teams. The craft is there, but the tools are different.

True — they just need to be more engineers than designers.

Re: Tailwind CSS v4.0

#92
post #84

Earlier quoted context omitted.

Design engineers still exist, they just write more JS these days. They are still building UI and design systems and teaching craft & supporting full stack teams. The craft is there, but the tools are different.

True — they just need to be more engineers than designers.

I don’t think putting html in one file and css in another file makes you more or less of a designer than putting both html and css into a single file.

Re: Tailwind CSS v4.0

#93

Last time I tried v4 the automatic content detection was pretty bad. It would falsely detect tailwind classes if it seen a similar name in a string in a code file. It seemed pretty dumb.

That is more or less how it worked in v3 already, because any string could be used as a CSS class.

"The way Tailwind scans your source code for classes is intentionally very simple — we don’t actually parse or execute any of your code in the language it’s written in, we just use regular expressions to extract every string that could possibly be a class name."

https://v3.tailwindcss.com/docs/content-configuration#class-...

The only difference in v4 is that scanning is so fast, they just scan roughly everything by default. You can still opt into manually specifying which files to scan.

https://tailwindcss.com/docs/detecting-classes-in-source-fil...

Re: Tailwind CSS v4.0

#94

Tailwind is mind-boggling to me. Like something that would be written by someone who doesn’t actually write a lot of HTML or CSS. Bootstrap is bad enough, where you end up using 4, 5, 6 classes for display, margin, padding alterations to existing components. It’s just unreadable crap. No wonder it’s popular though. Most people suck at designing. The ones that don’t aren’t using Tailwind.

>The ones that don’t aren’t using Tailwind.

True. And they're not using HTML or CSS either.

Re: Tailwind CSS v4.0

#95
post #77
post #75

Earlier quoted context omitted.

Not everything is a node App. We don't have a lock file because we don't have any local npm dependencies (as already mentioned). We're using `npx tailwindcss` as-is.

You clearly have a dependency on tailwindcss (if it can break you, you depend on it), and are using npm to fetch it (npx uses npm internally, they are installed together) so you can easily solve your problem by adding a couple json files with some version numbers in them. npx will pick up and use the version from your package.json, so no workflow change other than running `npm install …` once to generate package.json…

FWIW Tailwind can be used as a standalone executable.

This is how Phoenix/Elixir bundles Tailwind without requiring npm.

Re: Tailwind CSS v4.0

#96
post #61
post #28

Question for people who are good at CSS stuff. I am not. I'm upgrading a personal Phoenix project to 1.7, and Phoenix now uses Tailwind by default. So I thought I'd try and update my one page thing to use it instead of Bootstrap. So far, it looks like crap whereas the Bootstrap one looked 'good enough'. What's the easiest way to get something that looks kinda sorta decent, with some nice defaults, without trying to b…

> Or should I just reinstall Bootstrap and be done with this. That one. Tailwind gives you tools when you want to control the design, but you’ve got to control the design. When you just want something that looks good and don’t mind that bootstrap-y feel, bootstrap is the way to go. (There are projects that essentially recreate bootstrap on top of tailwind, which, in theory, might give you something like bootstrap as…

Disagree.

Just get one of the tailwind UX kits and use their classes as your standard style guide. I personally use flowise as it’s free with paid more complex components if needed, but there are a bunch of others out there that fill the same space.

Re: Tailwind CSS v4.0

#97
post #71
post #68

Earlier quoted context omitted.

They are cryptic but the learning curve is not that steep. Once you get the idea, it becomes much easier (and quite pleasant for a CSS hater like me). For example px-3 means "padding on the x axis 3 (spacing values)" and gives you padding on both left and right. There is a (rather simple) language that you need to learn and at least for me it made things much, much better. You can probably get the feel for it in seve…

ia that really easier than learning css directly? since you have to understand 'paddding'and 'px' ? see https://developer.mozilla.org/en-US/docs/Web/CSS/padding vs https://tailwindcss.com/docs/padding

One of the reasons Tailwind became so popular - even more so than preceding frameworks like Bootstrap - is that a lot of people who normally liked working with CSS directly fell in love with it. It removes the extra step of editing a separate CSS file without straying far from a 1:1 mapping and eliminates most of the cascading rules that have plagued frontend for decades (`group:` and friends notwithstanding). The latter is important when working on large teams because it eliminates the name bikeshedding and conflicts.

Re: Tailwind CSS v4.0

#98
post #92

Earlier quoted context omitted.

True — they just need to be more engineers than designers.

I don’t think putting html in one file and css in another file makes you more or less of a designer than putting both html and css into a single file.

Switching from CSS based design systems to large TypeScript monoliths requires you to learn one or two things about engineering

Re: Tailwind CSS v4.0

#100
I like tailwind but think it’s not needed anymore as CSS got better. Utility frameworks don’t necessarily need a build step.

I forked and finished Tachyons successor Tachyons 5: It has container queries built in and p3 colors.

https://github.com/gobijan/tachyons5/blob/main/tachyons5.css

If you need very sophisticated layouts write them in plain css. For quick styling utilities are awesome.

Unpopular opinion. Now downvote me to the ground.

Post reply on HN