Live data from Hacker News

Tailwind CSS v3.0

tailwindcss.com

201–210 of 448 posts

Re: Tailwind CSS v3.0

#201

I inherently from a coworker who was terminated, a web app built with Tailwind. The tailwind.config.js is missing. I can’t even begin to describe all of the reverse engineering I’ve tried to regenerate the config file with no luck and we’re royally screwed. Make sure you don’t lose that file!

Unless your coworker configured some plugins or extended some classes, a vanilla tailwind config with JIT-enabled should be all you need.

Re: Tailwind CSS v3.0

#202

Earlier quoted context omitted.

Coming up with variable/class names is one of the most annoying aspects of programming, so any way we can eliminate that task I think is always going to be a productivity boom

So strange. Using good variable names is even better than docs in my experience. And having HTML where every div is named helps a ton. It blows my mind how different people's preferences can be on these things.

Most people suck at naming things. Also, most companies don’t have a strong culture for choosing names carefully.

Honestly, I agree with you on the good variable names, but in average team setting I prefer no names than bad ones.

Re: Tailwind CSS v3.0

#203
Coming from someone who mostly does platform / service work and usually avoids "the frontend", tailwind helped me to actually understand CSS, it made sense to me and has saved me a lot of time. The site I built looked professional very quickly and without much effort.

Thank you to the team and I look forward to using it more in the future.

Re: Tailwind CSS v3.0

#204

I like the idea of tailwind, I’ve dealt with raw css and bootstrap before but I’m certainly no frontend developer. How can I learn tailwind enough to become proficient? Most of the documentation I looked at seemed to lack any tutorial on how to locate the correct classes I need, or any other sharp edges that might exist,

My process of learning Tailwind involved nothing but going to https://tailwindcss.com/docs, pressing Ctrl+K to bring up the search, and typing the class I'd use in "regular" CSS. Their search is great at picking these up.

Re: Tailwind CSS v3.0

#205

just got parachuted into a tailwind project. have to say I don't fully get it. the major stumbling block has been how tailwind is mostly just css translated into its own hard-to-memorize lingo. For example, say I want to do something basic like "display:flex; justify-content: start". In tailwind you would type "flex justify-start" instead. Which doesn't really follow any rules as far as how to get from A to B, so it'…

Consider using this handy Tailwind cheat sheet: https://nerdcave.com/tailwind-cheat-sheet

I have it open in a browser tab almost constantly.

Re: Tailwind CSS v3.0

#206

Earlier quoted context omitted.

>This works okay in extremely componentized web apps. It's a nightmare if your UI isn't highly componentized. I've seen projects where you make a button by copy pasting this ~80 character string of tailwind classes all over the place, and then changing the color names if you need to. Good luck fixing that when the designer decides that we don't want any buttons to have rounded corners anymore. That app is done wrong.…

So now we have to add this new postcss thing. Modern web dev is bandaids all the way down.

postcss is literally how tailwind works. If you are using tailwind, you already have postcss. I get it, you don't like modern frameworks. Don't use it.

Re: Tailwind CSS v3.0

#207
post #166

Is it possible to use the JIT feature with Golang template files?

Yes, just make sure the `content` config will read your files: https://tailwindcss.com/docs/configuration

Which template languages are supported? I wasn't able to find any information about that.

Re: Tailwind CSS v3.0

#208

Earlier quoted context omitted.

>This works okay in extremely componentized web apps. It's a nightmare if your UI isn't highly componentized. I've seen projects where you make a button by copy pasting this ~80 character string of tailwind classes all over the place, and then changing the color names if you need to. Good luck fixing that when the designer decides that we don't want any buttons to have rounded corners anymore. That app is done wrong.…

Or make a Button component in your framework of choice. function Button = ({ children }) => {children} Create Edit // Same style Delete // Same style

Even then, I would still recommend using the postcss extend tag. Much easier to read that way. Also, postcss doesn't require any frameworks, you can still do everything with plain ol' html and javascript.

Re: Tailwind CSS v3.0

#209
post #176
post #56

The thing that made Bootstrap click for me years ago as a backend developer were these complete example layouts: https://getbootstrap.com/docs/5.1/examples/ Is there anything similar for Tailwind CSS?

I'm the founder of Shuffle, and Tailwind CSS is one of the technologies we support: 1. https://shuffle.dev/editor 2. https://shuffle.dev/components/tailwind 3. https://shuffle.dev/setup The tool is paid, but we have many free components/layouts more than Bootstrap docs.

Paying customer of Shuffle here, this is an answer to a different question. This is not what was asked.

Re: Tailwind CSS v3.0

#210
post #62

Earlier quoted context omitted.

Speaking as a non-cargo culting developer, Tailwind is evil. It doesn’t understand CSS nor the document hierarchy it depends on, and almost every project that has had a frontend developer touch it has turned into an unmaintainable mess. Not to mention the tooling overhead. I had to revert countless JSP files due to strange compilation bugs that resulted in classes only sometimes(?) being added.

It’s not traditional css and you need to accept that if you want to work with it. It has a load of benefits in a different dimension to css, and personally I think they’re worth the trade off. My main issue with it is the inability to control the order of precedence with the css rules. It’s mostly fine, but when you have runtime rules around, say, colouring text based on a few different variables, it turns into a bit…

I use tailwind with Angular, and we solve this with using [ngClass] to add/remove the class. You could do something similar with plain JS as well, and I imagine in most frameworks. Although yes, that is annoying to have to deal with.
Post reply on HN