Install Tailwind CSS as a PostCSS Plugin (Version 2.0)

  Рет қаралды 15,554

Thirus

Thirus

Күн бұрын

Watch • Install Tailwind CSS a... for latest version v2.2
This video:
Install and setup Tailwind CSS 2.0 using PostCSS and optimize for production using Purge CSS. No other frameworks or libraries needed.
Subscribe and stay tuned for tips, tutorials and more.
Follow me on Twitter: / shrutibalasa
Follow Thirus on Twitter: / thirusofficial
Visit my website: www.shrutibala...
#tailwind #tailwindcss #postcss

Пікірлер: 144
@mharding7
@mharding7 3 жыл бұрын
Best PostCSS video on KZbin! Every other instruction/tutorial left my with a PostCSS not found error. This one fixed it. Outstanding!
@Thirus
@Thirus 3 жыл бұрын
That’s great to know! Thank you 😊
@marcelnunez1658
@marcelnunez1658 3 жыл бұрын
Same, a lot of videos explain it on a very confusing manner
@notsure8175
@notsure8175 3 жыл бұрын
I was tired looking a good explanation of using purge function in tailwind. Thanks a lot!
@Thirus
@Thirus 3 жыл бұрын
You’re welcome 😊
@minnkhantnaing9604
@minnkhantnaing9604 3 жыл бұрын
I have been looking for a way to install Tailwind on my computer without any node error and this video saves me many hours. Thank you so much.
@Thirus
@Thirus 3 жыл бұрын
You’re welcome 😊
@joyousblunder
@joyousblunder 3 жыл бұрын
THANK YOU! You have no idea how hard was to find this content!
@Thirus
@Thirus 3 жыл бұрын
So glad you finally found it and loved it :)
@geearellano9112
@geearellano9112 3 жыл бұрын
GOOD JOB THANK YOU JUST GOT HIRED and my TL told me that I should learn this! life saver
@Thirus
@Thirus 3 жыл бұрын
Amazing!!
@John-wx3zn
@John-wx3zn 3 жыл бұрын
What does TL stand for?
@g-kems
@g-kems 2 жыл бұрын
Thank you for the clean tutorial! The purge and dark options are no more necessary
@Thirus
@Thirus 2 жыл бұрын
Yes, that’s changed in version 3
@ej7623
@ej7623 3 жыл бұрын
thank you, I am trying to learn Tailwind CSS . Thank you for very clear explanation about prod and purge.
@Thirus
@Thirus 3 жыл бұрын
You’re welcome 😊
@pablorenteria7807
@pablorenteria7807 3 жыл бұрын
thankyou the best tutorial to install tailwind
@Thirus
@Thirus 3 жыл бұрын
So glad 🙂
@neerajsinghtangariya2587
@neerajsinghtangariya2587 3 жыл бұрын
very productive video for installing tailwind css with postcss...thank you for this...:)
@Thirus
@Thirus 3 жыл бұрын
You’re welcome 😊
@alanb3258
@alanb3258 3 жыл бұрын
Nice clear video and it worked first time with a basic Svelte program. Thank you lots
@Thirus
@Thirus 3 жыл бұрын
That’s great! You’re welcome 😊
@manuelnunez8239
@manuelnunez8239 2 жыл бұрын
Straight to the point. thank you
@Thirus
@Thirus 2 жыл бұрын
Glad you liked it. But for the latest version, you should watch this video: Install Tailwind CSS v3 - CDN vs CLI vs PostCSS kzbin.info/www/bejne/nmq9pqFqZpKCsMU
@thatsasif
@thatsasif 3 жыл бұрын
Hi, very helpful video. After building for production you opened the styles.css of src in explorer. Anyways the info was already opened which was pointing to the right file of public. :)
@Thirus
@Thirus 3 жыл бұрын
Genius! 😀 I figured it out after publishing the video, so I left it as it is.
@hafizjavaid
@hafizjavaid 3 жыл бұрын
Help me a lot I almost tried from everywhere really great job. Thank you
@Thirus
@Thirus 3 жыл бұрын
You’re welcome 😊
@alistairmorris462
@alistairmorris462 3 жыл бұрын
Perfect - thank you Shruti - you're a star!
@Thirus
@Thirus 3 жыл бұрын
Aww thanks! 😊
@wildogreco5102
@wildogreco5102 3 жыл бұрын
GRACIAS, es el mejor video de como instalar tailwind.
@bvdizon
@bvdizon 2 жыл бұрын
Thank you Thirus!
@Thirus
@Thirus 2 жыл бұрын
You’re welcome!
@raheessaifudeen1878
@raheessaifudeen1878 3 жыл бұрын
Thank you!, this video help me a lot. 😊
@Thirus
@Thirus 3 жыл бұрын
You’re welcome :)
@anuj7286
@anuj7286 3 жыл бұрын
Mam, i am little confused which dependencies should i install with --save-dev flag or without flag devependencies.
@syamprasad6038
@syamprasad6038 2 жыл бұрын
Could you make a video about the same but with v3.0, also include important things like purge and production ready
@Thirus
@Thirus 2 жыл бұрын
That video is on the way! Recording in progress. By coming Monday / Tuesday it should be out.
@marcelnunez1658
@marcelnunez1658 3 жыл бұрын
This was very useful, thanks, subbed
@Thirus
@Thirus 3 жыл бұрын
Awesome!
@AceOfTheHood
@AceOfTheHood 3 жыл бұрын
Im getting 'npm is not recognized as an internal or external command, operable program or batch file' when i entered the npm init -y. Any way i can fix that.
@Thirus
@Thirus 3 жыл бұрын
You will need to install npm first. Search on Google how to do that
@palashagrawal2343
@palashagrawal2343 Жыл бұрын
mam my tailwind is not detecting whenever I am adding new tw class. I have followed all your steps of production still not getting. What can be the error mam?
@Thirus
@Thirus Жыл бұрын
You will have to share your folder structure and config file screenshots. DM me on Twitter @shrutibalasa
@yifeige6089
@yifeige6089 3 жыл бұрын
Thanks, your video really helped me a lot!!
@Thirus
@Thirus 3 жыл бұрын
Glad to hear that! :)
@jorgearraga
@jorgearraga 3 жыл бұрын
Great tuto Shruti, thanks you! =)
@Thirus
@Thirus 3 жыл бұрын
You’re welcome 😊
@AHMEDRAZA-do5dn
@AHMEDRAZA-do5dn 3 жыл бұрын
Nice and very helpful video
@Thirus
@Thirus 3 жыл бұрын
Thank you 😊
@bernardchisumo4054
@bernardchisumo4054 3 жыл бұрын
why this command alone doesn't work npm install -d tailwindcss@latest postcss@latest autoprefixer@latest ?
@Thirus
@Thirus 3 жыл бұрын
Do you get an error?
@mibaatwork
@mibaatwork Жыл бұрын
Is there any way in tailwind css to obfuscate my css classes in html so no one can just copy my design from the page? I used sveltekit, postcss and vite.
@Thirus
@Thirus Жыл бұрын
No matter what you do, you can’t stop people from copying the design from your page. Front end is like that.
@tabgaming5943
@tabgaming5943 3 жыл бұрын
Prod Command is not working for me .. What Should I do? Please help me
@Thirus
@Thirus 3 жыл бұрын
What happens when you run it?
@madhavanand756
@madhavanand756 3 жыл бұрын
How are you getting those emojis on installation, Plz Plz help & reply
@Thirus
@Thirus 3 жыл бұрын
I think that was older version
@hariprasadyakkala9086
@hariprasadyakkala9086 3 жыл бұрын
Please let me know how to add the custom text shadow and other custom class to use
@Thirus
@Thirus 3 жыл бұрын
Check this for creating custom utility classes - tailwindcss.com/docs/adding-new-utilities Otherwise you can add regular classes and regular CSS anyway (in src > styles.css)
@TheKizon
@TheKizon 3 жыл бұрын
it was really helpful, thank you so much
@Thirus
@Thirus 3 жыл бұрын
You’re welcome 😊
@lahila7383
@lahila7383 3 жыл бұрын
instant subscription, thank you so much
@Thirus
@Thirus 3 жыл бұрын
Welcome 😊
@bernardchisumo4054
@bernardchisumo4054 3 жыл бұрын
Nice explanation ,but I have a question ,what make the difference of using postcss and without postcss ? Which one is better for building large application and why?
@Thirus
@Thirus 3 жыл бұрын
Tailwind CSS requires the autoprefixer package to add vendor prefixes (to make some CSS work on all browsers) and that would need PostCSS So for large projects it’s important to install and setup Tailwind as a PostCSS plugin
@philip9677
@philip9677 3 жыл бұрын
can we use purge on non tailwind classes for example to our base stylesheet
@Thirus
@Thirus 3 жыл бұрын
No, purge css doesn’t compress the CSS file. It removes unused classes from the stylesheet
@bhanuprakash5925
@bhanuprakash5925 3 жыл бұрын
I am geeting npm ERR! Missing script. Can you please help me. I am new to node and Tailwind.
@oivchenko
@oivchenko 3 жыл бұрын
Thanks ! Very useful
@Thirus
@Thirus 3 жыл бұрын
Welcome 😊
@John-wx3zn
@John-wx3zn 3 жыл бұрын
Your are a dear. Thank you. Can you do a tutorial that shows how to do it with webpack to?
@Thirus
@Thirus 3 жыл бұрын
Does this help? levelup.gitconnected.com/setup-tailwind-css-with-webpack-3458be3eb547?gi=308ae37fd02e
@John-wx3zn
@John-wx3zn 3 жыл бұрын
@@Thirus Yes, but I had to install autoprefixer before installing tailwindcss. I appreciate you. :)
@darshanpagar1894
@darshanpagar1894 2 жыл бұрын
How to use this styles.css folder in some other html file which is in different folder.
@sibtycodes3358
@sibtycodes3358 2 жыл бұрын
Every thing went right over my head 🥲
@Thirus
@Thirus 2 жыл бұрын
Oops. How much of front end knowledge do you have? Will try and help
@sibtycodes3358
@sibtycodes3358 2 жыл бұрын
@@Thirus Thanks , I did every thing you showed in the video, additionally I installed vite and run js debug and it worked 💌
@sibtycodes3358
@sibtycodes3358 2 жыл бұрын
@@Thirus took many hours as i am a beginner but figured it out , thx for your help
@kosseytz893
@kosseytz893 2 жыл бұрын
I'm getting error with npm run build
@Thirus
@Thirus 2 жыл бұрын
This is an old video. Please follow the new one: kzbin.info/www/bejne/nmq9pqFqZpKCsMU
@abhipshasahu2868
@abhipshasahu2868 3 жыл бұрын
What can postcss do that we can't do without it?
@Thirus
@Thirus 3 жыл бұрын
Some features like using the `apply` directive might not work without PostCSS
@christianprojects4401
@christianprojects4401 2 жыл бұрын
Thank You Mam
@Thirus
@Thirus 2 жыл бұрын
Welcome!
@osmangoplani1205
@osmangoplani1205 2 жыл бұрын
Sister can you tell me how can I install this extension in Visual studio
@fbenfrank
@fbenfrank 2 жыл бұрын
Hello could you help explaining when it shows zsh: command not found: npm. I’m really struggling with this error.
@Thirus
@Thirus 2 жыл бұрын
Looks like you haven’t installed npm.
@fuad7258
@fuad7258 3 жыл бұрын
yeah, i got you sister
@anas_ouh4223
@anas_ouh4223 3 жыл бұрын
Hello, how did you open the terminal please ?
@Thirus
@Thirus 3 жыл бұрын
Cmd + J
@lh536
@lh536 3 жыл бұрын
Thank you! Very useful video! One question... do you recommend to install win-node-env as a global dependency?
@Thirus
@Thirus 3 жыл бұрын
It’s okay to install it globally
@anuj7286
@anuj7286 3 жыл бұрын
I couldn't watch postcss with -w flag and both compile & watch is not working or can we compile tailwindcss into sass with node-sass?
@ezeobisunny
@ezeobisunny 3 жыл бұрын
I tried but it is showing showing me npm error: unexpected end of json input while parsing near .....
@Thirus
@Thirus 3 жыл бұрын
Check if you have missed a comma somewhere in package.json file
@shayakdey6787
@shayakdey6787 3 жыл бұрын
Should i have to install tailwind each time for different projects?? Reply please
@Thirus
@Thirus 3 жыл бұрын
Yes, you have to. If that takes too much time, feel free to clone this GitHub repository github.com/ThirusOfficial/tailwind-css-starter-postcss
@shayakdey6787
@shayakdey6787 3 жыл бұрын
@@Thirus I'm beginner actually. If i install tailwind css once and copy those tailwind files for future uses. Will it work??
@Thirus
@Thirus 3 жыл бұрын
Message me on Twitter @shrutibalasa
@shayakdey6787
@shayakdey6787 3 жыл бұрын
My vscode run slow when install tailwind, don't know why
@Thirus
@Thirus 3 жыл бұрын
I don’t think tailwind is the reason
@shayakdey6787
@shayakdey6787 3 жыл бұрын
@@Thirus it is because of 3mb css file. I cannot properly use sass compiler extension.
@queenspendler
@queenspendler 3 жыл бұрын
Wow, this is a life saver. Thank you so much! How would you add a library for uglifying your css file?
@Thirus
@Thirus 3 жыл бұрын
Thank you! You mean minify? You don’t need anything additional. You could simple use purge that comes along with Tailwind - it removes all unused CSS
@queenspendler
@queenspendler 3 жыл бұрын
​@@Thirus Thanks for your hint. I solved this by adding cssnano: npm install cssnano --save-dev and extend the postcss.config.js by the call: require("tailwindcss"), require("autoprefixer"), require('cssnano')({ preset: 'default', }), Now all comments are removed and the css file is just one line, which makes it more difficult to understand :)
@sylvanusmukhim3108
@sylvanusmukhim3108 3 жыл бұрын
Great video content Ma'am. 👍❤️ But after following along. "npm run build" Doesn't seem to be working in my Project not that. "npm run prod" either. Is there any problem in my Project ma'am? Thank you
@Thirus
@Thirus 3 жыл бұрын
Can’t say much until I look into your code. Send me a screenshot of your terminal on Twitter - twitter.com/shrutibalasa
@excybeats5321
@excybeats5321 3 жыл бұрын
thank you so much
@Thirus
@Thirus 3 жыл бұрын
You’re welcome!
@ShamsulIslamSujon
@ShamsulIslamSujon 3 жыл бұрын
Hi Shruti, Thanks for the video. It is really helpful. I am just having trouble with building the CSS every time I change the CSS or tailwind config. Maybe I want to add some custom CSS or add some configuration to the tailwind.config.js to meet my design perfectly and I have to run the command every time after the changes. This is quite annoying for me. I have searched and seen some videos where they have used some watch command and it builds the CSS automatically without typing the build command manually. But I think I've messed up and can not configure it properly. Can you make a video with the watch command too?
@Thirus
@Thirus 3 жыл бұрын
Hi Shamsul, You can install the npm package onchange `npm install onchange` Add this script to `package.json` file "watch": "onchange 'tailwind.config.js' './public/**/*.html' './src/**/*.css' -- npm run build" Then you can simply use this command to watch all those files `npm run watch` Hope this helps
@ShamsulIslamSujon
@ShamsulIslamSujon 3 жыл бұрын
​@@Thirus I don't know why it does not watch the changes. Can you see my config and tell me if I did anything wrong? prnt.sc/ybspo3
@Thirus
@Thirus 3 жыл бұрын
I think your build script is not right. It should be "build": "postcss ./src/styles.css -o ./public/dist/styles.css" You have an extra 'build'. Also, check the file paths. But everything else looks fine
@vishnuchitara
@vishnuchitara 2 жыл бұрын
When I run "npm run build" it give me error. What should I do right now.
@Thirus
@Thirus 2 жыл бұрын
What’s the error?
@vishnuchitara
@vishnuchitara 2 жыл бұрын
@@Thirus I already sent you on twitter Mam
@arskhatri9825
@arskhatri9825 3 жыл бұрын
alright! but i have an error of 'npm run prod' please help me to solve. Error: A complete log of this run can be found in:
@Thirus
@Thirus 3 жыл бұрын
Kindly DM me on Twitter with a screenshot of the error
@dreammanor_ru
@dreammanor_ru 2 жыл бұрын
Привет! Спасибо за видео, всё очень понятно и наглядно. Удачи в дальнейшем.
@PushkarThakar
@PushkarThakar 3 жыл бұрын
how to do this in VS 2019
@Thirus
@Thirus 3 жыл бұрын
VS code is the recommended editor because you get the intellisense plugin. Haven’t used VS 2019, so I don’t know what’s different there
@PushkarThakar
@PushkarThakar 3 жыл бұрын
@@Thirus I am not worried about IntelliSense. How can I get PostCSS or something similiar for VS 2019
@Thirus
@Thirus 3 жыл бұрын
The editor has nothing to do with postcss. Postcss is an NPM package. Are you familiar with npm?
@PushkarThakar
@PushkarThakar 3 жыл бұрын
@@Thirus Yes, but I do not get the option in VS 2019 to run NPM commands while working in MVC core applications
@Thirus
@Thirus 3 жыл бұрын
That’s okay, you can open terminal or command prompt to run the same commands
@hariprasadyakkala9086
@hariprasadyakkala9086 3 жыл бұрын
Hello, I have install the live server using this command : npm install live-server and it's worked fine, but when i use this command : liver-server public it will not shows this error Please rectify this ------- liver-server : The term 'liver-server' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again. At line:1 char:1 + liver-server public + ~~~~~~~~~~~~ + CategoryInfo : ObjectNotFound: (liver-server:String) [], CommandNotFoundException + FullyQualifiedErrorId : CommandNotFoundException
@Thirus
@Thirus 3 жыл бұрын
It’s not liver-server. It’s live-server. There’s an extra ‘r’
@hariprasadyakkala9086
@hariprasadyakkala9086 3 жыл бұрын
@@Thirus Thank you, Please let me know how to add the custom fonts to css file using linke font face
@Thirus
@Thirus 3 жыл бұрын
Watch this video - kzbin.info/www/bejne/baXRc396r95-q9U
@jerrymatera
@jerrymatera 3 жыл бұрын
only that my styles are now gone
@Thirus
@Thirus 3 жыл бұрын
??
@jerrymatera
@jerrymatera 3 жыл бұрын
@@Thirus all my styling is purged while on production
@Thirus
@Thirus 3 жыл бұрын
Your path to HTML file was not correct I guess
@jerrymatera
@jerrymatera 3 жыл бұрын
@@Thirus thanks it's done
@nilambarsharma4869
@nilambarsharma4869 3 жыл бұрын
Good content. Nice. But your terminal is ugly. Please give it a make over.
@boxmanpiyushgaming5339
@boxmanpiyushgaming5339 3 жыл бұрын
Can u go slow
@Thirus
@Thirus 3 жыл бұрын
You can watch it in 0.5x speed
@boxmanpiyushgaming5339
@boxmanpiyushgaming5339 3 жыл бұрын
@@Thirus tats wat I am doing sister 0.25 x😂😂😂😂
@boxmanpiyushgaming5339
@boxmanpiyushgaming5339 3 жыл бұрын
But it's working
@lutzgerken9634
@lutzgerken9634 3 жыл бұрын
Thanks for the video, it helped me a lot.
@Thirus
@Thirus 3 жыл бұрын
You’re welcome 😊
@ajith007-ytb
@ajith007-ytb 3 жыл бұрын
Thank you so much for the video, it was very helpful!
@Thirus
@Thirus 3 жыл бұрын
You’re welcome Ajith 😊
Install Tailwind CSS v3 - CDN vs CLI vs PostCSS
34:19
Thirus
Рет қаралды 31 М.
Theming Tailwind with CSS Variables
27:24
Tailwind Labs
Рет қаралды 125 М.
WORLD BEST MAGIC SECRETS
00:50
MasomkaMagic
Рет қаралды 50 МЛН
🍉😋 #shorts
00:24
Денис Кукояка
Рет қаралды 3 МЛН
The day of the sea 😂 #shorts by Leisi Crazy
00:22
Leisi Crazy
Рет қаралды 1,1 МЛН
Complete CSS Flexbox Tutorial using Tailwind CSS
38:17
Thirus
Рет қаралды 39 М.
Building Tailwind with PostCSS
10:44
Codecourse
Рет қаралды 6 М.
Styling Forms with Tailwind CSS
17:25
Tailwind Labs
Рет қаралды 141 М.
Subgrid in Tailwind CSS - You didn’t know you needed this
14:12
Setup Tailwind CSS on Laravel Tutorial (2024)
8:38
Yelo Code
Рет қаралды 12 М.
Sizing Images and Videos with Aspect Ratios with Tailwind CSS
8:43
Tailwind Labs
Рет қаралды 54 М.
WORLD BEST MAGIC SECRETS
00:50
MasomkaMagic
Рет қаралды 50 МЛН