10 Tailwind Classes I Wish I Knew Earlier

แชร์
ฝัง
  • เผยแพร่เมื่อ 18 มิ.ย. 2024
  • Tailwind has thousands of classes, but 99% of them are just one-to-one mappings to CSS. There are a few classes, though, that go beyond just mapping directly to CSS and these classes are incredible for writing high quality clean code. In this video I am going to share the 10 Tailwind classes I wish I knew earlier since they make writing Tailwind code so much easier.
    📚 Materials/References:
    TH-cam Home Page Tailwind Clone: • How To Create The YouT...
    🌎 Find Me Here:
    My Blog: blog.webdevsimplified.com
    My Courses: courses.webdevsimplified.com
    Patreon: / webdevsimplified
    Twitter: / devsimplified
    Discord: / discord
    GitHub: github.com/WebDevSimplified
    CodePen: codepen.io/WebDevSimplified
    ⏱️ Timestamps:
    00:00 - Introduction
    00:42 - #1
    02:10 - #2
    02:38 - #3
    04:03 - #4
    04:47 - #5
    05:36 - #6
    06:01 - #7
    07:57 - #8
    10:05 - #9
    10:47 - #10
    12:01 - Bonus
    #Tailwind #WDS #CSS

ความคิดเห็น • 199

  • @cryptoboy1461
    @cryptoboy1461 4 หลายเดือนก่อน +226

    00:00 - Introduction
    00:42 - #1 - container
    02:10 - #2 - size
    02:38 - #3 - divide
    04:03 - #4 - space
    04:47 - #5 - line-clamp
    05:36 - #6 - truncate
    06:01 - #7 - working with gradients
    07:57 - #8 - ring
    10:05 - #9 - using animations
    10:47 - #10 - working with screen readers
    12:01 - Bonus - @tailwind/typography

    • @lokeshr9794
      @lokeshr9794 3 หลายเดือนก่อน +2

      True hero

    • @skywizard3319
      @skywizard3319 3 หลายเดือนก่อน +4

      the Web dev simplified we deserve

    • @adipati27ma
      @adipati27ma 3 หลายเดือนก่อน +1

      Great Job!

    • @edism
      @edism 3 หลายเดือนก่อน

      Nice!

    • @TechnoTube001
      @TechnoTube001 3 หลายเดือนก่อน +5

      Thank you. I appreciate the video and knowledge it shares but really hate such cheap tricks to mark timestamps as 1,2,3.. so that we are forced to watch the whole video. It makes it really difficult to reference it.

  • @MohamedMostafa-jw5xk
    @MohamedMostafa-jw5xk 3 หลายเดือนก่อน +31

    I like how tailwind has made some pivotal and revolutionary changes on how we style our websites and apps. In my own experience it has actually improved my CSS literacy to a great extent, and I personally consider it the de facto of the modern styling especially in the world of components-based web development.

  • @dominuskelvin
    @dominuskelvin 4 หลายเดือนก่อน +60

    Tailwind utilities and short hands are often missed but they are just good for productivity. My favorite is space-y and space-x

    • @DeepTitanic
      @DeepTitanic 4 หลายเดือนก่อน +8

      Sounds so much more efficient than using margin-block. What do you do with the all the time you’ve saved

    • @davonnev696
      @davonnev696 3 หลายเดือนก่อน

      Definitely going to have to try these out ..!

    • @user-ud4bj9vc7l
      @user-ud4bj9vc7l 3 หลายเดือนก่อน +1

      Yeah spacex is good company

    • @renejotas
      @renejotas 3 หลายเดือนก่อน

      i think they defeat the purpose, now you gonna have to know what each utility is instead of just understading what the class directly maps to in css. Also dont space your stuff manually, do create containers that flow to be the design you want.

  • @AyyazZafar
    @AyyazZafar 3 หลายเดือนก่อน +2

    Your every video is extremely helpful and with full of value. You are doing great job. Keep it up :)

  • @Lundito
    @Lundito 3 หลายเดือนก่อน +6

    The size class is pretty new to Tailwind and definitely welcome.
    I'd like to add the inset-classes as they are nice for positioning.

  • @hgfggjhg
    @hgfggjhg 2 หลายเดือนก่อน

    Dude! The line-clamp class saved me! Thank u so much.

  • @josuedelossantos9442
    @josuedelossantos9442 หลายเดือนก่อน

    Thank you for this video Kyle, it's really helpful!

  • @adipati27ma
    @adipati27ma 3 หลายเดือนก่อน +1

    thank you, always simple and boom!!🔥

  • @seedme
    @seedme 3 หลายเดือนก่อน +1

    Prose looks awesome 🎉 thanks for sharing.

  • @Shaunmcdonogh-shaunsurfing
    @Shaunmcdonogh-shaunsurfing 3 หลายเดือนก่อน

    Awesome. Loved the divide one

  • @djonsi88
    @djonsi88 4 หลายเดือนก่อน +3

    Thanks for these tricks Kyle!
    In my last side project I used Styled Components to create reusable UI components and Tailwind when I wanted to add some small styling for specific elements, worked like a charm.

    • @alexg4927
      @alexg4927 3 หลายเดือนก่อน

      😮 why

    • @rand0mtv660
      @rand0mtv660 3 หลายเดือนก่อน

      Why would you combine these two? Doesn't make sense to me really.

  • @bobdpa
    @bobdpa 4 หลายเดือนก่อน

    Great video. Thanks!

  • @anhngocle738
    @anhngocle738 3 หลายเดือนก่อน

    it's so convenient and faster. Thank you!

  • @djdankmemes9257
    @djdankmemes9257 3 หลายเดือนก่อน +1

    You're the best dude, way to live up to the channel name

  • @muba000
    @muba000 4 หลายเดือนก่อน +4

    Hey WDS, great tut! But i would not recommend extending default Tailwind class like container. Using different class name would be better in real word scenarios.

  • @user-xu3lj1ej8d
    @user-xu3lj1ej8d 3 หลายเดือนก่อน +1

    Thanks for Line Clamp !

  • @joaovicsaa
    @joaovicsaa หลายเดือนก่อน

    Nice tips, thanks!

  • @DesignDensity
    @DesignDensity 3 หลายเดือนก่อน +1

    Thank you, Kyle!
    TH-cam is full of strange and ambiguous tutorials but your channel is clearly what simplifies everything!
    I reckon every lib should have a dedicated section called simplified, so you could go and simplify their 10k of useless docs into 10 lines and yet easier to grasp in no time!
    You are amazing 😊

  • @user-cu8qq2ld2e
    @user-cu8qq2ld2e 3 หลายเดือนก่อน

    Thank you. That was great

  • @GiovanneAfonso
    @GiovanneAfonso 2 หลายเดือนก่อน

    great tailwind tips!

  • @WeirdoPlays
    @WeirdoPlays 3 หลายเดือนก่อน

    Amazing never knew this before ❤

  • @msalih
    @msalih หลายเดือนก่อน

    Great, I actually hate to write tests. But you make me warm about it

  • @weslleyfillipe1532
    @weslleyfillipe1532 3 หลายเดือนก่อน +1

    thanks for Line-clamp and container center:true!

  • @MohamedNabih
    @MohamedNabih 2 หลายเดือนก่อน

    thank bro it's really usefull for me

  • @Sviatoslav-wv3qy
    @Sviatoslav-wv3qy 3 หลายเดือนก่อน +3

    I hope someone already wrote it, but using space instead of gap is not a good solution at all. The thing is, space class was added before gap was available for flex box and it basically sets margins to the items. Basically, it has 2 downsides: it's old and you can't set other margins on any of your items inside container manually as space property will overwrite them. So the best solution is to use gap.

  • @weavers-construction-solutions
    @weavers-construction-solutions 3 หลายเดือนก่อน

    I changed my career thanks to you Kyle, thank you so much

  • @alexandrmeyer
    @alexandrmeyer 3 หลายเดือนก่อน

    Wow, mega useful. I wish I knew it earlier too :)

  • @milleniummoses
    @milleniummoses หลายเดือนก่อน

    I wish I'd seen this video BEFORE making my latest project. I might even go back and refactor some thing just for efficiency's / cleaner code sake.

  • @kueifeng66
    @kueifeng66 3 หลายเดือนก่อน

    Great job! I love you

  • @unpluggedaman
    @unpluggedaman 4 หลายเดือนก่อน

    Super useful 👏👏

  • @charlieplett
    @charlieplett 2 หลายเดือนก่อน +1

    My favourite class is grid grid-cols-[1fr_2.5fr_5%_auto]
    I only use this for styling, instead of using flex.

  • @henryamos
    @henryamos 3 หลายเดือนก่อน +1

    @Web Dev Simplified do you have tailwind css course becuase you did excellent job with this tricks

  • @joe_j
    @joe_j 4 หลายเดือนก่อน +1

    Pllease do a video on animation of pages. Can be in tailwind and CSS. Like having smooth pages and transitions

  • @ryanquinn1257
    @ryanquinn1257 3 หลายเดือนก่อน +1

    Amazing. I knew half of these and should’ve read the docs more for the other half.
    I use gradient way too much after learning it. Why just black when it could be slate to black to gray?

  • @codedjango
    @codedjango 4 หลายเดือนก่อน +1

    You are already a GOD.... you already know all the classes....i m sure....the title seems misleading 😂😂

  • @juanmacias5922
    @juanmacias5922 3 หลายเดือนก่อน +1

    Damn, that prose option is great, I wonder if you could get it to work with mermaid markdown.

  • @themarksmith
    @themarksmith 3 หลายเดือนก่อน +1

    Your hair is still breathtaking... lol - an excellent video..., I love tailwindcss content...

  • @martygo
    @martygo 2 หลายเดือนก่อน

    Awesome!

  • @WilhelmBerggren
    @WilhelmBerggren 3 หลายเดือนก่อน

    Thanks! I would have found this a lot more useful if you showed the definition of a tailwind class as well, to show both how it works and what it does

  • @iThou001
    @iThou001 2 หลายเดือนก่อน

    ❤❤ I got to try this

  • @MirkoTorrisi92
    @MirkoTorrisi92 3 หลายเดือนก่อน +1

    Tailwind is like the evolution of css. Every front end dev must know it

  • @omtechofficial
    @omtechofficial 3 หลายเดือนก่อน

    Thanks ❤

  • @eleah2665
    @eleah2665 4 หลายเดือนก่อน

    Hi Kyle, all good. Thanks.

  • @gfabasic32
    @gfabasic32 3 หลายเดือนก่อน

    Super vids!

  • @Abdul_Wajid
    @Abdul_Wajid 4 หลายเดือนก่อน

    Please being a sequelize ORM crash course, that would be very helpful. Thanks in advance

  • @dedoyxp
    @dedoyxp 3 หลายเดือนก่อน

    good knowing these, because I still use bootstrap just because I just thought tailwind = css on class only

  • @icode8029
    @icode8029 3 หลายเดือนก่อน

    Hai Kyle, can you make a video about tools that you use with TailwindCSS

  • @pikavecordis5056
    @pikavecordis5056 4 หลายเดือนก่อน +1

    Feels like I have already seed this video

  • @ImIvee
    @ImIvee 4 หลายเดือนก่อน

    I wanna think it's just a coincidence because you didn't say anything about it, but (a few days ago) "Tom Is Loading" posted a video called 8 "TailwindCSS Classes I Wish I Found Earlier" featuring half of the classes seen here 😅
    Whatever it is, it's nice to learn new stuff and this kind of tricks, nice video! :)

    • @WebDevSimplified
      @WebDevSimplified  4 หลายเดือนก่อน +1

      That's really cool. I haven't seen his video, but it is funny we released videos so close together.

  • @zerokifaco6076
    @zerokifaco6076 3 หลายเดือนก่อน

    what device are you using. laptop or dekstop?

  • @SamuelKarani
    @SamuelKarani 4 หลายเดือนก่อน +1

    You forgot plugin tailwind animation! life saver!

  • @joshuadeguzman2911
    @joshuadeguzman2911 2 หลายเดือนก่อน

    I was waiting for the peer class.

  • @AmodeusR
    @AmodeusR 2 หลายเดือนก่อน

    instead of divide, using flex and gap looks more practical. Although you need to write more, you don't need to remember other term, flex is responsive.

  • @syedhaider0916
    @syedhaider0916 2 หลายเดือนก่อน

    PUT THIS VIDEO IN HALL OF FAME

  • @AndrewFloatrx
    @AndrewFloatrx 4 หลายเดือนก่อน +3

    Really, I don't know why I should learn 100500 new selectors (classnames) and use some tricks and hints instead of writing pure CSS (with preprocessors, etc). But tw is so popular last time & I'm sitting & watching this tuts, lol!

    • @ban-prem-001
      @ban-prem-001 3 หลายเดือนก่อน +1

      the selector is easy to remember, the name is following the property and the value, use function and directives, then your code is much more readable, better than using preprocessor

    • @shakilahmed6870
      @shakilahmed6870 3 หลายเดือนก่อน

      so you don't have to remember anything while using pure css? lmao

  • @theodorealenas3171
    @theodorealenas3171 4 หลายเดือนก่อน +1

    I'm really interested in opinions on this: at what point do you think one should use inline styles inside a tailwind based project? I haven't used tailwind, but as I watch videos like this, I wonder where one would draw the line

    • @N1r4
      @N1r4 3 หลายเดือนก่อน +3

      Why tho? Why would someone use inline styles when tailwind is available. The only reason to do this is if there's a new CSS property and tailwind don't have support for it yet.

    • @CribzStudio
      @CribzStudio 3 หลายเดือนก่อน +1

      I believe if you are using a state (which is typed string or number) as the direct value then you will most likely use inline. Because tailwind pre compiles it classes, it doesn’t know what num1 is `w-[${num1}px]`
      state num1 could be anything

    • @theodorealenas3171
      @theodorealenas3171 3 หลายเดือนก่อน

      Interesting. So tailwind is more about auto completion? I assumed it's about abstracting styles, or it's like shorthand. From what I get, you use it to standardize sizes, and then, for consistency, you also use it for styling something as inline block?
      The answer I expected to hear is, when I style something to be sticky then I use inline styling. I also thought CSS is pretty good at changing widths of elements based off of what class or attributes they have. I haven't written CSS at any significant scale.

  • @octavioimazio5358
    @octavioimazio5358 3 หลายเดือนก่อน

    This is oocss and got really popular in 2010 we started moving away years later, and now after 14 years is back !

  • @ahsanabrar880
    @ahsanabrar880 4 หลายเดือนก่อน

    thanks

  • @dhairyabhavsar6893
    @dhairyabhavsar6893 4 หลายเดือนก่อน

    I love to use tailwind, but found tailwind cause issue on google page speed and preforms as its load unused style. What’s your thoughts over this point for tailwind.

    • @zunovideos5033
      @zunovideos5033 3 หลายเดือนก่อน

      In docs, theres page about optimizing for production, you can check it

  • @jhirn2957
    @jhirn2957 3 หลายเดือนก่อน +2

    Tailwind is the epitome of dwim for CSS. That stands for Do What I Mean.

  • @jirawatmaubkhuntod1823
    @jirawatmaubkhuntod1823 4 หลายเดือนก่อน

    Supper good 👍

  • @Kayotesden
    @Kayotesden 4 หลายเดือนก่อน

    Damnit! Ive been using tailwindcss for over 3 years & I didnt know most of these...

    • @MrCC-hx8xr
      @MrCC-hx8xr 4 หลายเดือนก่อน

      Did you read doc? ;)

  • @jevonne8160
    @jevonne8160 3 หลายเดือนก่อน

    I use space-x and y a lot with flex box

  • @hooooman.
    @hooooman. 3 หลายเดือนก่อน

    In a simple html project,how to add tailwind css and still get that's tailwind intellicense class suggestion? I mean when i add the tailwind via CDN, I'm not getting the class suggestion in the html(suggestion is perfectly working in a react project tho)

    • @DarkzarichV2
      @DarkzarichV2 3 หลายเดือนก่อน

      Try adding tailwind config file in your root folder even just empty one should do the trick

  • @codewithved
    @codewithved 3 หลายเดือนก่อน

    nice video

  • @juliushernandez9855
    @juliushernandez9855 3 หลายเดือนก่อน +1

    Thanks kyle, didnt know tailwind have line clamp

    • @DeepTitanic
      @DeepTitanic 3 หลายเดือนก่อน

      CSS also has line clamp

    • @juliushernandez9855
      @juliushernandez9855 3 หลายเดือนก่อน

      @@DeepTitanic ye i use css for line clamp but didn't know line clamp in tailwind

  • @27sosite73
    @27sosite73 4 หลายเดือนก่อน

    ty mate
    ty

  • @Desperoro
    @Desperoro 4 หลายเดือนก่อน

    I have bootstrap, is better to switch to Thailwind? I am building my first react app

    • @DeepTitanic
      @DeepTitanic 4 หลายเดือนก่อน

      Tailwind and Bootstrap are pretty similar

    • @theodorealenas3171
      @theodorealenas3171 4 หลายเดือนก่อน

      Sorry if I'm out of place, but have you considered hand written CSS? I've only tried hand written and I feel overwhelmed when I look at Tailwind or bootstrap

  • @blackknight1268
    @blackknight1268 4 หลายเดือนก่อน

    What kinda shampoo do u use?

  • @theasdazx
    @theasdazx 4 หลายเดือนก่อน +166

    you didn't have to name chapters as numbers Kyle. chill we're gonna watch it okay holy

    • @leerenae313
      @leerenae313 4 หลายเดือนก่อน +7

      its not that deep lol

    • @hazfrd
      @hazfrd 4 หลายเดือนก่อน

      Why not tho

    • @wisdomelue
      @wisdomelue 4 หลายเดือนก่อน +6

      speak for yourself

    • @johndevnoza4223
      @johndevnoza4223 4 หลายเดือนก่อน

      Just keep it up. I love it

    • @DiogoLScarmagnani
      @DiogoLScarmagnani 4 หลายเดือนก่อน +3

      What the problem at all?

  • @tawsifbhuiyan8204
    @tawsifbhuiyan8204 4 หลายเดือนก่อน

    This guy is really awesome.

  • @Pareshbpatel
    @Pareshbpatel หลายเดือนก่อน

    Very useful tutorial on TailwindCSS Classes. Thanks, Kyle.
    {2024-04-21}, {2024-05-15}

  • @romanmed9035
    @romanmed9035 3 หลายเดือนก่อน

    can You create video about primereact?

  • @nguyenbalongvu9434
    @nguyenbalongvu9434 3 หลายเดือนก่อน

    damn the size property

  • @rishiraj2548
    @rishiraj2548 4 หลายเดือนก่อน

    👍

  • @cristianmargineanu1458
    @cristianmargineanu1458 3 หลายเดือนก่อน

    The moment you realize you know every class shown but you're a bread factory worker, wtf is wrong with me?

  • @ergusto
    @ergusto 2 หลายเดือนก่อน

    The square was a 1/4 the size that it was before, not half.

  • @jonasex3001
    @jonasex3001 3 หลายเดือนก่อน

    I'm shocked because I didn't know about most of those examples

  • @elielhdz2503
    @elielhdz2503 3 หลายเดือนก่อน

    M8 should share the CSS for his hair

  • @zoethebird1
    @zoethebird1 หลายเดือนก่อน

    wow

  • @jirawatmaubkhuntod1823
    @jirawatmaubkhuntod1823 4 หลายเดือนก่อน

    Some case i need border using gradients but i dont know how to use tailwild 😂

  • @sheivongamboa
    @sheivongamboa 3 หลายเดือนก่อน

    kile we need more videos uploads.. move often.. and higher audio

  • @beaticulous
    @beaticulous 3 หลายเดือนก่อน

    What kind of wind comes from the tail.

  • @fhrmk
    @fhrmk 3 หลายเดือนก่อน

    Whenever i watch kyle somehow my default playback speed is always 1.25X

  • @djamaatul
    @djamaatul 2 หลายเดือนก่อน

    instead repeate bg-blue-500 size-24 on child, using this put on parent only [&_div]:bg-blue-500 [&_div]:size-24

  • @denchke
    @denchke 4 หลายเดือนก่อน

    Thx for the info, Kyle. Can't ride of that feeling like "if you don't know CSS, then use those..." =(

  • @oyieroyier
    @oyieroyier 3 หลายเดือนก่อน

    You couldn't have used "size" class earlier because it's a new addition to Tailwind barely months old.

  • @zebraforceone
    @zebraforceone 2 หลายเดือนก่อน +1

    I'm trying to figure out what it is I don't "get" about tailwind, but all I see is inline class soup and lack of cascading.

    • @developersteve1658
      @developersteve1658 2 หลายเดือนก่อน +1

      Tailwind makes very little sense when used in a traditional html page, but thats because Tailwind is essentially inline styling with better dev-ex surrounding it.
      The cascading part of css can cause issues and unnecessary mental gymnastics when dealing with components, however, so Tailwind fills that niche.
      It's a specific tool for a specific use case rather than another "use me and only me" bootstrap-type style framework.

    • @zebraforceone
      @zebraforceone 2 หลายเดือนก่อน

      @developersteve1658 I would argue that using inline styling and no cascading takes us back to the days before CSS existed.
      Maybe remembering what that was like makes me biased though.
      I don't think it's worth the trade off. I can see how its useful for prototyping but right now I wouldn't even entertain the idea of using it in a large project.

    • @developersteve1658
      @developersteve1658 2 หลายเดือนก่อน +1

      @zebraforceone Oh, I get that for sure. With Next.js, Prisma, htmx, etc. It certainly feels like the "old" ways of doing things are coming back and being touted as new, fancy, and revolutionary. When in reality, they're just doing the same thing as .NET, any ORM, or php, respectively. In the case of Tailwind, it's just inline CSS, as you said. It's a step backward, right?
      However, I don't think it's so black and white.
      As an industry, web development has put all their eggs into the Javascript basket. With the creation of component-based architecture, we saw the rise of SPAs and the microservice, edge, and cloud architectures as well. All of this time and effort has been spent on making that work, but when we stepped away from those other technologies, I think we lost something.
      When all you have is a hammer, everything looks like a nail, right?
      So I see these "new" technologies such as Next, htmx, or even Tailwind as a remaking of tools lost in the shift to the "modern" design principles. Remade in (most importantly) the Javascript component ecosystem.
      When it comes to styling, components really don't behave well with a fully-opinionated style library that enforces structure like Bootstrap because it breaks component architecture, SASS is the same way, because it is designed around giving you utilities to quickly create classes that traverse the tree and apply styling. CSS, at its core, was created to cascade styling (duh) based on the structure of the DOM.
      Unfortunately, that behavior is just not suited to components when you are swapping out the DOM all the time. Either you design your components and styling in a way that expects certain DOM elements in certain orders (which is not really maintainable without considerable effort and documentation), or you don't use DOM selectors in your CSS which completely defeats the purpose of CSS in the first place.
      To get around these problems, we got styled components for a while, which was a hot mess, and I'm sure some other novel solutions, but eventually we got Tailwind.
      Now, it may seem like Tailwind is inline styling and will bring with it the same problems. However, it's not for one key difference: classes.
      Tailwind uses classes instead of styles directly, so everything can be changed and configured at the project level. You get the benefit of reusable code and all that without the structural lock-in of DOM selectors or larger classes, all written with and configured in the same language as your components and your business logic, and your database, etc.
      Tl;dr: I believe Tailwind, amongst other "new" tools in modern web-dev, are coming about because we lost something in recent years. By implementing older tools in modern ways, we are granted the benefit of less mental gymnastics and a better workflow when creating a majority of apps. Newer doesn't always mean better.

    • @zebraforceone
      @zebraforceone 2 หลายเดือนก่อน

      "When all you have is a hammer, everything looks like a nail, right?"
      Yes, not being used to engaged in some mental effort and getting comfortable with the "Computed" panel is, respectfully, in my opinion why people praise the Tailwind hammer :P
      "Unfortunately, that behavior is just not suited to components when you are swapping out the DOM all the time."
      Again I'm sorry but I disagree. The approach my team usually takes is to give each component a unique classname or data attribute, usually matching the components classname, then we use SCSS / SASS to wrap all the styling for that component in a single file, which we import from the components JS file.
      I've done this in dozens of projects now and you can move things around to your hearts content.
      I appreciate the case for styling components in an isolated way but the flip side of that is something I touched on already. If the design team decides that border radius is no longer a thing and we are having square edges everywhere then that is a trivial change to make with SCSS / SASS if you've structured your project correctly and used variables sensibly. With Tailwind this sends you on a goose chase for rounded-* in potentially hundreds of files.
      That's obviously an oversimplification but hopefully you get the point I'm trying to make here. The answer to poorly structured SCSS is to refactor, not apply Tailwind (and the class soup and mixture of concerns that goes with it).
      I should probably caveat that with the fact that I'm talking about larger projects here, I can see there's merit in using Tailwind for example if you want to ship a React component like a music player that absolutely must never collide with the selectors of the application it sits in.
      "Now, it may seem like Tailwind is inline styling and will bring with it the same problems. However, it's not for one key difference: classes."
      I fail to see how utility classes are any different from inline styling other than the fact that they are shorter. I suppose you can configure them at a project level by overriding them, but surely you are getting into muddy waters when customising "m-auto" so that it doesn't mean margin: auto; any more, as an example?
      "Tl;dr: I believe Tailwind, amongst other "new" tools in modern web-dev, are coming about because we lost something in recent years. By implementing older tools in modern ways, we are granted the benefit of less mental gymnastics and a better workflow when creating a majority of apps. Newer doesn't always mean better."
      I can't disagree with that but I respectfully fail to see how Tailwind is better than the numerous alternatives.
      Tldr from me, Tailwind may well save you having to get intimate with the "Computed" panel and think about stuff but it seems to me that if large changes are made to the design, for example a whitelist or rebrand, then you are going to have a fiendishly difficult time implementing that on a project full of utility classes. With well designed selectors, cascading and variables, it's absolutely trivial to do tasks like that. I am a bit long in the tooth but I know which I prefer.

    • @developersteve1658
      @developersteve1658 2 หลายเดือนก่อน

      @zebraforceone This is a wonderful response! Thank you for being one of the rare few online people who are respectful in their discourse.
      In short, I totally get what you're saying, and I'm not really trying to change your mind. I don't want you to feel like you're doing something wrong or will be left behind if you dont use Tailwind, because I'm very sure there's already other new tools out there that will make Tailwind obsolete and I don't even use it in my professional work, either. I just like it. :)
      More than anything, I'm trying to help you "get" Tailwind in the way that I do. I also think it's important to state that the best tool for any situation is one that gets the job done in the way you deem best. If your team is comfortable with SCSS and likes using business classes, then that's what you should use.
      Okay. With that being said...
      "Yes, not being being engaged in some mental effort and getting comfortable with the 'Computed' panel is, respectfully, in my opinion why people praise the Tailwind hammer :P"
      I think this is a bit of a strawman argument. I understand the sentiment that it can feel like Tailwind hand-holds people and can teach them bad habits that lead to poor development practices; that I understand. However, there's no reason why, when you use Tailwind for what it is (a library of utility classes with some nice dev-ex), it can be a supplement to other tooling. I disagree that it's a hammer.
      "The approach my team usually takes is to give each component a unique classname or data attribute, usually matching the components classname"
      This is exactly the process Tailwind seeks to resolve. Many people (me included) see this as the core anti-pattern with using CSS. There are three parts to this on why I'm opposed to this pattern.
      1. Coming up with classnames is a waste of time. It provides little to no benefit outside of the developer experience and they can often be obtuse and unhelpful. There are conventions and decisions you can make that can mitigate the effects of this, but it's all time spent not producing results.
      2. Even with tools like SCSS or SASS, these kinds of classnames obfuscate design in other files separate from the components which breaks the component model. Unlike the old way of separation of concerns where you had JS, HTML, and CSS, the fundamental principle of the component model is to combine all of them into one place and separate based on business or technical need.
      3. Styling components directly makes the unable to be reused. You can never use any selectors that change general styling, or they will trickle down. E.g. you have a container component that applies display:flex. Inside of this component you have other components that use flex utilities to position and scale themselves. Now, what happens when someone wants to use one of those child components in a different place? They won't be styled correctly, because they're not inside a display: flex. Another core philosophy of the component model is reusability and CSS breaks that, because the behavior isn't isolated to just the component.
      "If the team decides that border radius is no longer a thing and we are having square edges everywhere, then that is a trivial change with well-structured and sensibly named variables in SASS/SCSS. Tailwind sends you on a goose chase for rounded-* in potentially hundreds of files."
      In my opinion, this could be hand-waved in a similar way to your first point. "Learn your tooling". Using regex selectors can make you a wizard at doing this and even though it's not fun, I think this is less of a problem than it might seem to be. However, this is the stickiest part of Tailwind, or doing styling in this way at all and I get if it's a turnoff. I would say don't place so much weight on this as no matter what, concessions will need to be made. Blame the person who decided to remove rounding. Lol
      "The answer to poorly structured SCSS is to refactor, not apply Tailwind (and the class soup and mixture of concerts that goes with it)."
      That mixture of concerns is intentional. The tradeoff mixing technical aspects in favor of separating components by business concern. It's a fundamentally different way of approaching web-dev.
      "But surely you're getting into muddy waters when customizing 'm-auto' so that it doesn't mean margin:auto; any more, as an example?"
      With all due respect, that is a poor example. It, along with many other things, are foot guns. Yes, you can cause a lot of damage by changing something like that, but why would you? I admit I don't know enough to give you a good example of why the classes are better, but without a real-world example of configuration being a bad thing, I think this is a moot point.
      "I fail to see how Tailwind is better than the numerous alternatives."
      It's not. It's another tool in your toolbox to be used in specific circumstances, or if you like it. If your app, or development experience would be worse off by using it, then don't! It's no more or less valid to use Tailwind than it would be to use Bootstrap, MaterialUI, or SASS. This is what I meant by the hammer analogy: there's no one right answer to anything. It's better to know what tool to use and why.

  • @RocketLR
    @RocketLR 3 หลายเดือนก่อน

    idk why i didnt start using tailwind for my projects earlier..

  • @faiqarsheikh3220
    @faiqarsheikh3220 3 หลายเดือนก่อน

    Can someone give some unique fyp (Final Year Project) ideas in web development?

  • @luisbrescia8497
    @luisbrescia8497 3 หลายเดือนก่อน

    The container (1) just dont work for me.

  • @harithmu
    @harithmu 3 หลายเดือนก่อน

    his hair is consistent. how?

  • @youtischia
    @youtischia 4 หลายเดือนก่อน +1

    Good video. But the title isnt quite right. It should be "10 Tailwind classes I wish I HAD KNOWN earlier". Can you see the difference ? Very common error on youtube.

  • @jazymhmd1944
    @jazymhmd1944 3 หลายเดือนก่อน

    WAIT HE CENTERED A DIV!!

  • @zoom0244
    @zoom0244 3 หลายเดือนก่อน

    I spend so much time making a read more text, just to see it could've been done with 1 class line-clamp 2 the very next day 😐

  • @user-us3bs8px3m
    @user-us3bs8px3m 3 หลายเดือนก่อน

    I use space-* heavily. size-* and divide-* are amazing new classes to me.

  • @Booyamakashi
    @Booyamakashi 2 หลายเดือนก่อน

    typography plugin doubles tailwind output file. be careful.

  • @O-02
    @O-02 3 หลายเดือนก่อน

    I didnt understand the bonus one

  • @DeepTitanic
    @DeepTitanic 4 หลายเดือนก่อน +2

    Tailwind was great for beginners. It’s interesting that people are still making videos about it when there are better options than inline styles in 2024

    • @MrCC-hx8xr
      @MrCC-hx8xr 4 หลายเดือนก่อน +4

      you know nothing.

    • @Andrey-il8rh
      @Andrey-il8rh 4 หลายเดือนก่อน

      Can you name those? Btw, what inline styles has to do with Tailwind?

    • @DeepTitanic
      @DeepTitanic 4 หลายเดือนก่อน +3

      @@Andrey-il8rh Native CSS is better than ever and not difficult to learn.

    • @Andrey-il8rh
      @Andrey-il8rh 4 หลายเดือนก่อน

      @@DeepTitanic how learning native CSS conflicts with using Tailwind? How can you even use Tailwind without not knowing native CSS? Is it all your "better" alternatives?

    • @DeepTitanic
      @DeepTitanic 4 หลายเดือนก่อน +1

      @@Andrey-il8rh Bootstrap and Tailwind are unnecessary in modern projects. But feel free to use them in personal projects if it makes you feel comfortable

  • @antonyanovskyi6762
    @antonyanovskyi6762 2 หลายเดือนก่อน

    Thanks for so informative and useful video
    I’m really into it
    I don’t want to be rude but it would be nice if you could shake your head less
    It’s a bit distracting
    I just want your video become better
    I’m jealous your hair style 😊