tailwindlabs / discuss

A place to ask questions, get help, or share what you've built with Tailwind CSS.
MIT License
171 stars 9 forks source link

How can i customize my config file ? #232

Open cannsahinn opened 5 years ago

cannsahinn commented 5 years ago

Hello everyone ,

I'm coding with Django on VSCODE. According to this documentation , i applied 1 ,2 and 3 section (https://tailwindcss.com/docs/installation) and only i executed these codes on cmd ,

npm install tailwindcss npx tailwind init [filename]

then created node modules folder and others.

image

Is that enough for my project ? If it's enough , how can i customize my config file ? I'm so confused.

Best Regards,

Thanks.

devcircus commented 5 years ago

You shouldn't be creating the node modules folder. If npm install worked properly, it should be created already.

After following the "installation" instructions, if you want to customize, follow the "configuration" page. You can skip running "init" since you've already made it.

cannsahinn commented 5 years ago

Yes , that command created node_moduls folder . I did not add manually.

Should I run that code on cmd ?

./node_modules/.bin/tailwind init MYCSS

adamwathan commented 5 years ago

The config file is right there in the screenshot, tailwind.js. To customize it, just open the file and change it in your editor.

You also need to create a CSS file like outlined here: https://tailwindcss.com/docs/installation#3-use-tailwind-in-your-css

And then follow the instructions to compile your CSS using your build tool of choice: https://tailwindcss.com/docs/installation#4-process-your-css-with-tailwind

cannsahinn commented 5 years ago

Ok, I created my css file as mycss.css and used here: https://tailwindcss.com/docs/installation#3-use-tailwind-in-your-css.

Is that a problem ?

image

Compile my css, Is that true ?

image

adamwathan commented 5 years ago

That is just your editor warning you because "@tailwind" is not a real CSS feature, don't need to worry about that.

That command is not quite enough to compile your CSS, you need to specify an output path as well as your config path:

npx tailwind build mycss.css -c tailwind.js -o output.css

You might need to rename tailwind.js to tailwind.config.js because npx sometimes has issues with the default name on Windows.

adamwathan commented 5 years ago

Moving this to our discuss repo since this isn't an issue with the framework, just a request for help.

cannsahinn commented 5 years ago

It's done. Thank you so much . 👍