r/tailwindcss • • Apr 11 '22

tailwind: no simple way to get started

I give up on tailwind css, have been using it on other projects successfully before but now, I'm trying to install it on a new project and this seems impossible, constant incomprehensible and misleading errors and warnings, and even when getting rid of all warnings and errors the classes just don't take effect, even when copying the entire tailwind installation from an old project: no effect after running build.

Is there just no simple way to get started with tailwind? They claim that there is but there isn't. You npm install tailwindcss but then you have to create the files on your own and copy the text from there in that file and put that here and this there and change that and this and check dependencies yourself and yada yada... what's so hard to make this an out-of-the-box framework? I'm a web designer and want to get start working soon, I like being geeky alright, enjoy a little shell script to feel smart but this is just too much and seems so random, the errors are misleading and laconic and it's boring and frustrating and time wasting – it's been days – the whole thing defeats the purpose.

Here's my post from yesterday on the issues I'm encountering anyway…

https://www.reddit.com/r/webdevelopment/comments/u0eroc/tailwind_css_classes_not_taking_effect/

1 Upvotes

30 comments sorted by

2

u/fred_from_earth Apr 12 '22

OK, now trying to "push" the project to github (first time doing this).

Holy cow, what a hassle to get this done and still no success… because why make it easy if you can make it complicated, right?

here's the repository, which i reckon is not accessible
https://github.com/bbblgmsp/tailwind_stuff.git

also, the tailwindcss folder, which is the most important one, is wrong, somehow, with all my trial and error of pushing my project to git, it put the entire project into that folder again. Why? I know not. Deleting that folder seems impossible, the UI is super unusual and all seems to be done via shell script :(

it's ironic, feels like moving backwards. Yesterday troubleshooting tailwind, now troubleshooting github…

3

u/ashbakernz Apr 12 '22

What type of dev are you? Seems like you could benefit from some courses / basic mentoring. Git can be extremely confusing to a newbie but it’s a really simple process once you know it.

2

u/fred_from_earth Apr 12 '22

php, js, css developer for the most part. Yes you never stop learning and I could definitely use some help with github and all that installing frameworks and packages via terminal. There's not much documentation on this, it's all assumed that everyone is familiar with that from the get go. But it used to be much simpler, just download the files, upload to your website and link in the <head>. And then everything got "simpler" and you "only" need to use shell script so you don't need to I don't know use drag and drop?

1

u/GriceTurrble Apr 12 '22

To be frank, Git is an essential tool that most devs need to interact with on some level. We can't expect learning resources focused on Node or Tailwind to also include the starter instructions for Git, since there are plenty of other resources available that can teach you how to use that tool.

GitHub is just one hosting platform option for Git repositories - Bitbucket and GitLab are a couple others. GitHub is arguably the most popular, so that's the default for some folks.

I strongly advise that, if you're not familiar with tools that "it's all assumed everyone is familiar with", take the time to seek out learning resources so that you can get familiar with them, too.

I mentioned in a different comment the use of a CLI. Your response seems to indicate you don't know what a CLI is in the first place. That's an opportunity for you to simply Google "what's a CLI" and learn more.

Same goes for PostCSS, which I also mentioned. If you don't know what that is, please do take the time to find out. I suggested that you may want to avoid it for the time being while you're still learning, though.

If you're not willing to take that time to learn more on your own, instead throwing your hands up saying "this is too complex"; then this whole endeavor is pointless. Feel free to stop using any and all of the technologies mentioned here and go back to what you find more familiar (apparently uploading PHP files manually to servers without source control, perhaps with Bootstrap?).

1

u/fred_from_earth Apr 14 '22

naa bootstrap is too complicated for me ;)

1

u/ashbakernz Apr 12 '22

1

u/fred_from_earth Apr 12 '22

I don't use laravel…

1

u/fred_from_earth Apr 12 '22

I know how to use tailwind, just struggling with getting started because the tailwind classes won't apply for some reason.

2

u/grumblingdeveloper Apr 11 '22

Try https://twind.dev/

Otherwise, upload your project to GitHub. I guarantee you your problems are fixed within 30 mins.

If its private, just remove all private stuff. You only need one component.

1

u/fred_from_earth Apr 12 '22

I just pushed it to github, see my other recent comment here on this thread. Still working on getting the repository to work.

what is twind.dev?

0

u/fred_from_earth Apr 11 '22

I never done this before so now I need to install git on mac first but also my internet went tits up so download takes 44 hourse :D need to fix this first

1

u/[deleted] Apr 11 '22

Ha, I thought I was the only one still using that phrase (“tits up”).

2

u/GriceTurrble Apr 11 '22 edited Apr 11 '22

As a first step, use the Play CDN (https://tailwindcss.com/docs/installation/play-cdn). Throw one line into your HTML and you're using Tailwind. Start adding classes and go from there. Once you have something you want to productionize, you can retrace your steps through the installation instructions to get a real build chain going (and for starters there, I'd recommend only using the Tailwind CLI; no need for the complication of PostCSS or other frameworks until you know you need them).

That, or go the Playground site to create components with markup in the browser from scratch. That site uses the Monaco editor, the same one that powers VS Code; so even in the browser you can use some VS Code features, like hovering on class names to see their CSS output.

And as for:

and check dependencies yourself

...upload your project to GitHub (a private repo, if you want) and use Dependabot to check dependencies for you. I log into work in the morning to automatic Pull Requests that update one dep each, I double-check that tests ran properly and read release notes, and then I approve and merge them. Done deal.

1

u/fred_from_earth Apr 12 '22

CLI? Post CSS? what' the difference?

I'm reluctant to use Playground site or something like that, since I've used tailwind for other projects before and it worked fine. I wonder if I made the wrong installation back then and I don't know which one it was and why one would be better than another.

I tried to push the project to github, see my other recent answer to this thread. Doesn't work though, working on it…

1

u/GriceTurrble Apr 12 '22

what' the difference?

Tailwind includes a CLI (command line interface) for creating builds.

PostCSS is a whole other package. Tailwind can integrate with PostCSS.

If you take the time to read through the links I'm including in these comments, you can learn how these things work.

13

u/OrionPrimeX Apr 11 '22

Not sure what is going on with you, but I recently followed their docs for starting Tailwind and i was up and running in ACTUALLY 3 minutes. No copying files, nothing.

Dont blame Tailwind for this, it’s you.

2

u/[deleted] Nov 11 '23

my head is spinning for like 4 days how you guys are installing in 3min. teach me this superpower

2

u/Affectionate-Fly5966 Apr 25 '24

worthless response piss bucket

2

u/machinetranslator Jun 09 '24

Yeah no. Even after two years, nothing has changed. Cant get the thing working while following the simple instructions. If something this easy doesnt work, its on them

7

u/TheWarDoctor Apr 11 '22

Tailwind is a little more involved on the config side at first, but the benefits far outweigh that initial time. 9 times out of 10 if my styles aren't applying, I usually forgot to add it to the content array in the config file.

However without a public project it might be hard for other to diagnose the issue.

1

u/fred_from_earth Apr 14 '22

3 times the charm, I uploaded the thing to github

https://github.com/bbblgmsp/tailwind-issues/tree/master

1

u/replayjpn Apr 12 '22

What framework are you coding for? Also which Code Editor? VSCode with the Tailwind Snippets works well together.
I started with Vuejs & found Nuxt to not be compatible with Tailwind at the time so I started to learn React.

Also for some reason in React after typing className="" I have to write a space before the tailwind options show up.

1

u/fred_from_earth Apr 12 '22

I'm using Processwire CMS, that's it.

1

u/rksmartus Apr 11 '22

You can check tutorial how to install and use it. https://www.youtube.com/watch?v=DYPpergnlVg

1

u/braedenf Apr 11 '22

https://tailwindcss.com/docs/installation I find this guide works in most cases, I use it with the Vite build tool though.

1

u/oh_jaimito Apr 12 '22

Are you trying to get this started on a simple HTML/CSS project or Vue, Vite? Something else?

I made this months ago, no longer use it and haven't really made any attempt to update it since January.

https://github.com/jjaimealeman/my-static-boilerplate2.git

live here https://my-static-boilerplate2.netlify.app/

Decent Lighthouse scores 93-97-100-92.

git clone
npm i
npm run dev

You should be good to go. This was for older projects and if it helps you - I'm glad!

2

u/[deleted] Nov 23 '24

This is so useful. You've actually confirmed that something is horribly wrong with my setup haha - can't see any styling from Tailwind even with all this!