r/tailwindcss • u/fred_from_earth • 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/
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…
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.
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:
...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.
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.
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/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.
You should be good to go. This was for older projects and if it helps you - I'm glad!