Live data from Hacker News

Tailwind CSS v4.0

tailwindcss.com

111–120 of 296 posts

Re: Tailwind CSS v4.0

#111

Question for those developers who, like me, have no f/end build step: How would I use tailwind without a f/end build step? All the examples of using tailwind 4.0 on the linked site assume a f/end build step. My project does not use (and I have no plans to include) npm, or PostCSS, etc.

For a static site I have, I manually run the Tailwind tool when I include new classes. It generates style css and I commit this file to git.

Re: Tailwind CSS v4.0

#112

Question for those developers who, like me, have no f/end build step: How would I use tailwind without a f/end build step? All the examples of using tailwind 4.0 on the linked site assume a f/end build step. My project does not use (and I have no plans to include) npm, or PostCSS, etc.

This is what keeps me from using Tailwind too. I simply do not want to add the maintenance headaches of an npm-based build process to my project.

Re: Tailwind CSS v4.0

#113
post #75
post #73

Earlier quoted context omitted.

You’re doing something silly living without a lock file to use a tool as part of your build process. Why don’t you actually include the version of the tool you want in your dev dependencies + lock file? That way, you don’t get broken. We’ve had the solution to this problem - lock files - for 15ish years, since Ruby’s `bundle` introduced it.

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.

Shove an @ version in it

Re: Tailwind CSS v4.0

#115

Question for those developers who, like me, have no f/end build step: How would I use tailwind without a f/end build step? All the examples of using tailwind 4.0 on the linked site assume a f/end build step. My project does not use (and I have no plans to include) npm, or PostCSS, etc.

I'm pretty sure the point of using TailwindCSS is to use build step. There is another way, it uses Tailwind's CDN. But I think even the developer don't recommend it outside of development phase

If you don't want to use NPM, I can recommend Tailwind's standalone CLI

Re: Tailwind CSS v4.0

#116

Question for those developers who, like me, have no f/end build step: How would I use tailwind without a f/end build step? All the examples of using tailwind 4.0 on the linked site assume a f/end build step. My project does not use (and I have no plans to include) npm, or PostCSS, etc.

I'm pretty sure the point of using TailwindCSS is to use build step. There is another way, it uses Tailwind's CDN. But I think even the developer don't recommend it outside of development phase If you don't want to use NPM, I can recommend Tailwind's standalone CLI

> If you don't want to use NPM, I can recommend Tailwind's standalone CLI

Didn't know there was one. Will look into it.

Re: Tailwind CSS v4.0

#117

Question for those developers who, like me, have no f/end build step: How would I use tailwind without a f/end build step? All the examples of using tailwind 4.0 on the linked site assume a f/end build step. My project does not use (and I have no plans to include) npm, or PostCSS, etc.

For a static site I have, I manually run the Tailwind tool when I include new classes. It generates style css and I commit this file to git.

Thanks; I actually did not know there was one until you and the sibling poster told me.

To anyone else with the same question: See https://tailwindcss.com/blog/standalone-cli

Re: Tailwind CSS v4.0

#118

Question for those developers who, like me, have no f/end build step: How would I use tailwind without a f/end build step? All the examples of using tailwind 4.0 on the linked site assume a f/end build step. My project does not use (and I have no plans to include) npm, or PostCSS, etc.

This is what keeps me from using Tailwind too. I simply do not want to add the maintenance headaches of an npm-based build process to my project.

> I simply do not want to add the maintenance headaches of an npm-based build process to my project.

Apparently I was just too blind to find it - here is how you can (presumably) use tailwind without pulling in npm and node.js.

https://tailwindcss.com/blog/standalone-cli

Re: Tailwind CSS v4.0

#119
CSS has become significantly more user-friendly than in the past, with most browsers now behaving consistently. It's worth learning as there is no build step involved, and it avoids cluttering your markup with excessive code.

You could opt to use style attributes directly within your HTML. Historically, we avoided this to maintain a separation of concerns, but it's puzzling why some prefer reintroducing similar methods. Is it just to save a few keystrokes? Using style attributes even seems more straightforward since it doesn't require translating code in your head.

I simply don't see the appeal.

Re: Tailwind CSS v4.0

#120
post #103

My initial reaction to Tailwind was: what a pain. I already know CSS, now I have to learn CSS again... I imagine its how parents might feel when they go to help their children with math homework only to find the math is now totally different from when they were in school and their methods (while still valid) for solving problems are no longer accepted by the school and their child is annoyed by having to reconcile th…

I think it’s because now your entire component is contained in a single file. No more separately messing around with CSS. The styles are right there on the element they apply to without having to cross reference anything. You could do this with just the css attribute, but that has the issue that everyone has always been taught it is wrong to do that, and a list of strings that contain a bunch of utility is easier tha…

> You could do this with just the css attribute, but that has the issue that everyone has always been taught it is wrong to do that

But why is it wrong to use the style attribute? What makes using tailwind to do the same thing "not wrong"?

Also this https://tailwindcss.com/docs/hover-focus-and-other-states#us... and https://tailwindcss.com/docs/hover-focus-and-other-states#st... look like reinventing the Cascading of CSS with an awful syntax.

Post reply on HN