Тёмный

05: Composing Utilities with @apply - Tailwind CSS v2.0: From Zero to Production 

Tailwind Labs
Подписаться 95 тыс.
Просмотров 57 тыс.
50% 1

Опубликовано:

 

10 сен 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 77   
@Jugement
@Jugement 2 года назад
Dude, this is so sick !!! When i first heard about Tailwind, i was kinda skeptical about the class stacking which would result from a functionality oriented framework, but this removes nearly every issue regarding this topic !! Mad respects, i'm genuinely super hyped to start using Tailwind
@zihadhosan23
@zihadhosan23 3 года назад
while you talk, I can see you're smiling very lightly. smile of haven. I really like how you're teaching us with pleasure. I appreciate how you describe everything as like easy as bite a cake. Thank you!! I'm switching BootStrap to Tailwain. :D
@tmstechsup3992
@tmstechsup3992 3 года назад
Are you from Bangladesh?
@zihadhosan23
@zihadhosan23 3 года назад
@@tmstechsup3992 Yes 🇧🇩🇧🇩
@tmstechsup3992
@tmstechsup3992 3 года назад
@@zihadhosan23 amgo deshe vai maximum manush bootstrap,php,angular chara ar kisui chine na 🙂 egular baireo j aro koto kisu ase,RU-vid na ghatle jantam i na
@abdullahkhalidomi3808
@abdullahkhalidomi3808 3 года назад
​@@tmstechsup3992 jane vai jane. but tutorial banay na ei ki
@TheXuism
@TheXuism 2 года назад
Tailwind makes Boostrap like a trap.
@lukasluftlaufer1093
@lukasluftlaufer1093 3 года назад
Watching from video 1 I was like "meh, why learn a new thing, when I have scss?", but slowly I am getting a fan of tailwind, also thanks to these beautiful tutorials here. Thanks as lot :)
@ed1nh0
@ed1nh0 2 года назад
As a frontend developer I've been working with CSS since earlier 2000's. Day by day Tailwind continues to surprise me with all its features!
@JoanSubiratsLlaveria
@JoanSubiratsLlaveria 3 года назад
Man, TailwindCSS it's amazing, but this guy speak very clear. Thank you!!!
@23pointblank
@23pointblank 3 года назад
Very cool. I am definitely switching from bootstrap to this.
@hey_ashy
@hey_ashy 3 года назад
Same. I switched from Bootstrap to Tailwind for my project I started a few days ago. I personally feel it's so much better as it has more granular control over the ui.
@yestermonth
@yestermonth 3 года назад
@@hey_ashy how's it going?
@J90JAM
@J90JAM 3 года назад
This is where having experience of modular CSS comes in handy 🙌
@goncalodumas
@goncalodumas 3 года назад
This card is familiar! Thanks for condensing Adam's (also great, but old..er) videos!
@jarednthomas
@jarednthomas 2 года назад
Great video, thank you! 😊❤️
@adisakjantrasopark7672
@adisakjantrasopark7672 3 года назад
Thank you for these clips but I need help to fix this " @layer " [vite] Internal server error: Expected a pseudo-class or pseudo-element. and " Unknown at rule @tailwind css (unknownAtRules) [1, 2, 3,]"
@onthecodeagain
@onthecodeagain 3 года назад
I had the same issue, it was the formatter putting a space in the tailwind.css file so for example sm:text-base became sm: text-base
@craigburton4447
@craigburton4447 3 года назад
How did you look at the generated css?
@JoseGarcia-vr8mx
@JoseGarcia-vr8mx 2 года назад
This is brilliant! Thank you so much for the tutorial!
@Raj-jz4fc
@Raj-jz4fc 3 года назад
Explanation is awesome
@Psyzenn
@Psyzenn 9 месяцев назад
The easiest fix in the universe. When you hover over btn or btn-primary to show pop-up with the info tho that require some extension to check your tailwind and display.
@AnatolyKosorukov
@AnatolyKosorukov 3 года назад
I think all Tailwind business components related to @apply idea. This one helps develops all of that.
@vasiovasio
@vasiovasio 2 года назад
Great video, but one suggestion - You can use CSS Nano to abstract, combine and optimize all things together, and no need to do it manually.
@beqashekiladze8937
@beqashekiladze8937 Год назад
How did you generate the 'tailwind.css demo' content? It looked like regular css.
@anandanss
@anandanss 2 года назад
Very helpful tutorial, thank you 👍
@Ryu-vg8td
@Ryu-vg8td 2 года назад
Hello j'ai remarqué ton accent francais, j'ai un petit soucis avec @apply il ne récupère pas mes nouvelles classes vous avez une idée pour cela fonctionne je trouve aucun élément de réponse
@markryandelarmente8349
@markryandelarmente8349 3 года назад
Wow, awesome man. Thanks for this video
@user-de6vs4it1w
@user-de6vs4it1w 3 года назад
非常棒的教程
@treyrader
@treyrader 5 месяцев назад
that's one way to do it! cool tutorial. I guess if you were writing in react, you'd just make a button component and dump all the classes in there, yea?
@khalidahmada3906
@khalidahmada3906 3 года назад
Thank you ! so powerful
@iamthekingofchoco
@iamthekingofchoco 2 года назад
first, I select the text using multicursor. Then, use CMD+X to cut. But when I paste it back to the btn class, it pastes the text twice..! It is supposed to paste only once?
@DjokovicIsOurLordAndSaviour
@DjokovicIsOurLordAndSaviour 2 года назад
Adding the class to the @tailwind components section or as a layer is having no effect for me. Anyone have any ideas?
@arponkapuria3330
@arponkapuria3330 Год назад
try running the dev command if you installed using npm.
@ignaciomatiasdiaz9710
@ignaciomatiasdiaz9710 7 месяцев назад
Excelente.
@GharKiKheti
@GharKiKheti 2 года назад
Is it recommended to use @layer component @apply directive with JIT? Can we use it without making code duplication?
@EnterOsaka
@EnterOsaka 2 года назад
You're copying and pasting and moving code like a pro in VSC, how do you do it. I have no idea and am not a power user yet :) I have really enjoyed following along with these videos!
@zorro1rr
@zorro1rr 3 года назад
Why did he put the shadow-lg hover:-translate-y-0.5 transform inline in the html instead of in the tailwind.css btn-primary apply? Just to show how both ways are done? In my mind if we are going to decide to using the apply feature it might be best to put all of the unique styles there. Thanks for the videos!
@vasiovasio
@vasiovasio 3 года назад
Yes, I ask myself the same...
@user-cx3hf3ux7o
@user-cx3hf3ux7o 10 месяцев назад
Which editor you are using/
@alanballard8740
@alanballard8740 3 года назад
How do you get that font for "class" in your editor?
@franki8469
@franki8469 3 года назад
1:25 how do look on this css file generated from my tailwind classes?
@smritinayak1171
@smritinayak1171 2 года назад
have you got the solution?
@abhilashoommen4704
@abhilashoommen4704 3 года назад
which ide are you using, want that preview
@rickdev1922
@rickdev1922 3 года назад
it's a sizzy browser
@lucasdallier1023
@lucasdallier1023 Год назад
good!!
@SebastianPerezG
@SebastianPerezG 2 года назад
i can't make that work, i did the same and its not working , i need some extra plugin for that ?
@arponkapuria3330
@arponkapuria3330 Год назад
it worked for me when ran the dev command
@xames7789
@xames7789 2 года назад
Doesnt work classes in my codes. Idnk why? Can anyone help me or anyone have problem like that?
@xames7789
@xames7789 2 года назад
Or should i dowload some extension?
@marekkarasz3776
@marekkarasz3776 Год назад
why this does not work with my version 3.2 ?
@arponkapuria3330
@arponkapuria3330 Год назад
it worked for me when i ran the dev command
@samduss4193
@samduss4193 7 месяцев назад
there is a french or german accent in the background right i guess french am I right ? lol
@weizhixie9678
@weizhixie9678 2 года назад
I am not afraid of CSS anymore. Thanks, Tailwind team.
@willianarcaya
@willianarcaya 3 года назад
Great tool!! but I have issues moving btn classes to @apply or @layer. Console says [vite] Internal server error: Expected a pseudo-class or pseudo-element. Plugin: vite:css
@omurchu
@omurchu 3 года назад
Hey, have you solved this ? I am getting The `active:bg-gray-400` class does not exist, only on the active class
@willianarcaya
@willianarcaya 3 года назад
​@@omurchu Hi There! I did some tests and found that some classes are generating errors after moving it to the tailwind.css file. After removed those classes the code works fine. Also, I've tried on another projects with different classes and everything goes well. Removing class by class on my code with errors I found that hover could be the cause of my error. Using just inline Tailwind styles everything run smoothly
@willianarcaya
@willianarcaya 3 года назад
Edit: After trying with a few different methods I always got the same result. Error: Expected a pseudo-class or pseudo-element. on @apply I Cant use pseudo elements such as Hover. :(
@BrianDanchilla
@BrianDanchilla 3 года назад
For me it was breaking until I noticed I had a space after a pseudo element. eg hover: bg-indigo-500 to hover:bg-indigo-500 fixed the issue
@aj4819
@aj4819 3 года назад
@@willianarcaya I just looked at the source code in github from the link below the video and grabbed all the classes from there, copied them into my css file and it worked. I must have typed something incorrectly somewhere. EDIT: Actually that didn't do it, but going into VS Code settings and unticking css:validate seemed to do the trick!
@mattari97
@mattari97 2 года назад
This is awesome. The only annoyance is that its not working w/ intellisense.
@mo_fifunjesuke
@mo_fifunjesuke 2 года назад
it's not??? Maybe that is why mine isnt working
@mattari97
@mattari97 2 года назад
@@mo_fifunjesuke no unfortunatly. If you want intellisense you should create it in the tailwind.config plugins
@MrMazvaz
@MrMazvaz 10 месяцев назад
@layer is not a tailwind directive. Its css
@TailwindLabs
@TailwindLabs 10 месяцев назад
We actually added `@layer` as a preprocessor function before it was a thing in CSS, so it behaves differently in Tailwind than natively. There are no `@layer` rules in the final output.
@Ch051
@Ch051 11 месяцев назад
tailwind: semantic css is bad also tailwind: @apply
@aram5642
@aram5642 3 года назад
Yuck
@devKazuto
@devKazuto 3 года назад
It's just ugly having dozens and dozens of classes in HTML and violates "Separation of concerns". CSS is where the style resides, not HTML. Otherwise, you could just as well write inline styles directly in HTML. Usually, you have a style guide for projects anyway, so there shouldn't be a need to know what a class applies but only which classes to use.
@TheRafark
@TheRafark 3 года назад
The styles are still in a separate CSS file... I found the code actually beautiful. In the last lesson, when he added position absolute to the image but had to add position relative to the parent div, it was extremely readable. You could see the word relative in one line and then the word absolute right in the next line. This relationship in a CSS file is a nightmare (making sure the parent has a relative position when needed. You seem to be very closed minded.
@devKazuto
@devKazuto 3 года назад
@@TheRafark I'm far from closed-minded. But I use languages and tools as they're intended to and not how I want them to function. That's why I dislike the JSX. HTML in PHP has been taboo, "smelly code" or bad practice for a long time and that's why Blade and Twig came to life, yet writing HTML in JS seems to be acceptable, even though it's no different from HTML in PHP. No, it's not acceptable. It's ugly and is completely against "Separation of concerns". Now add "utility-first" styling to it. It becomes a complete and utter mess. Hard to read and even harder to maintain. It's fairly simple: HTML is for layout, CSS is for style and JS for functionality. You don't merge these into one large blob. "making sure the parent has a relative position when needed" that's part of the job. If that's a problem for you, you seem to be very lazy, to use your own words.
@Tobias-
@Tobias- 2 года назад
@@devKazuto I think there's an audience for everything. This clearly is not for you. I'm trying to figure out if I like this. At the moment I see having this apply function as a fix for a non existing problem. When just writing in css in the first place I mean ;-) We're back at square one.
@pradeepb
@pradeepb 2 года назад
[plugin:vite:css] C:/Users/HP/Desktop/tailwind/css/tailwind.css?direct:18:205: The `active:bg-indigo-600` class does not exist, but `hover:bg-indigo-600` does. If you're sure that `active:bg-indigo-600` exists, make sure that any `@import` statements are being properly processed before Tailwind CSS sees your CSS, as `@apply` can only be used for classes in the same CSS tree.
@themodernmonk7
@themodernmonk7 Год назад
Why is it not working in my version 3.1.8???
@arponkapuria3330
@arponkapuria3330 Год назад
did you solve the issue ?
Далее
ДОКАЗАЛ ЧТО НЕ КАБЛУК #shorts
00:30
Tailwind V4 Is Bigger Than Expected 👀
20:07
Просмотров 122 тыс.
10 Tailwind Classes I Wish I Knew Earlier
13:31
Просмотров 182 тыс.
I WISH I Knew These Tailwind Tips Earlier
9:15
Просмотров 185 тыс.
The Advanced TailwindCSS Crash Course
37:39
Просмотров 14 тыс.
Using CSS custom properties like this is a waste
16:12
Просмотров 170 тыс.
Translating a Custom Design System to Tailwind CSS
10:10
Stop using an extension to compile Sass
21:39
Просмотров 128 тыс.
Styling Forms with Tailwind CSS
17:25
Просмотров 141 тыс.