Tailwind CSS Tips, Tricks & Best Practices

Поділитися
Вставка
  • Опубліковано 19 вер 2024

КОМЕНТАРІ • 82

  • @samselikoff
    @samselikoff  4 роки тому +19

    For those asking about keyboard shortcuts + extensions, I made a follow-up vid going over my workflow: ua-cam.com/video/qIHR2wmxy3U/v-deo.html

    • @joshbaker5566
      @joshbaker5566 2 роки тому +1

      Sam my man, I love seeing your unfiltered workflow--shortcuts and all, but especially how you update the TailwindCSS classes within the devtools before applying updates to your code in the IDE. Great stuff!

  • @CTILET
    @CTILET Рік тому +2

    I like your channel cause you use Next js, tailwind and framer motion. For me it is a best stack

  • @kamalhm-dev
    @kamalhm-dev 4 роки тому +9

    When the creator itself endorse you, you know it's gonna be good!

  • @Christogonus_uche
    @Christogonus_uche 4 роки тому +6

    I truly like your content Sam, i often look forward to your new video on anything front-end. We appreciate what you do and the effort and grace you put in making your videos. I am fan, and also follow you on twitter and your front-end podcast series.

    • @samselikoff
      @samselikoff  4 роки тому +2

      Thank you so much for the kind words Chris!

  • @boggeshzahim3713
    @boggeshzahim3713 3 роки тому +4

    I'm really excited to start using tailwind at my job for front end, we were previously doing inline styles with React but seems much cleaner

  • @merodiro
    @merodiro 4 роки тому +3

    in exercise 7 you could use space-x-{amount} to add space between items without adding space to the left and right

  • @pfom
    @pfom 4 роки тому +2

    The focus-visible and plugins part was very useful! Thank you, Sam!

  • @gustavogarzaki5217
    @gustavogarzaki5217 4 роки тому +1

    Great content. My English is not so good but you talk and explain the concepts very well. Thanks, Sam!

  • @syedmehdiabbas2078
    @syedmehdiabbas2078 2 роки тому

    your camera quality is so good, it's almost wrong

  • @h.kubilay6160
    @h.kubilay6160 4 роки тому +2

    with working svgs you can use fill-current text-gray-500 in svg wrapper element also.

  • @RaoVenu
    @RaoVenu 3 роки тому +1

    Sam: Excellent tutorial and hands on labs. Many thanks

  • @AlexanderBogdanov-dw6cw
    @AlexanderBogdanov-dw6cw 4 місяці тому

    Огромное Вам спасибо, супер урок!)

  • @muh2k4
    @muh2k4 3 роки тому +2

    Wow, really great examples and explanation. Flawless :) Thank you!

  • @mattmelvin5712
    @mattmelvin5712 4 роки тому +3

    Your workflow with vim seems perfect to me. Can you make a video on your workflow with vim that'd be great. Thanks!

    • @samselikoff
      @samselikoff  4 роки тому

      In case you missed it I made a follow-up video on this here: ua-cam.com/video/qIHR2wmxy3U/v-deo.html

  • @heyiamigor
    @heyiamigor 3 роки тому

    This channel is a gem 🔹

  • @iali3903
    @iali3903 4 роки тому +4

    you are absolutely awesome! I really love your content, keep going

  • @christianangelomsulit3759
    @christianangelomsulit3759 3 роки тому +1

    Helpful content 😊

  • @rmznovali
    @rmznovali 4 роки тому +1

    This has been really great, better than most of the css courses out there. I hope you grow successful.

    • @h.kubilay6160
      @h.kubilay6160 4 роки тому

      gosterdigi bir cok seyi flex ile daha rahat yapabilirsin mesela input svg vs gereksiz kasmis flexi at gec

  • @amrtaha7554
    @amrtaha7554 2 роки тому

    great, I really appreciate all of your videos, I loved the way you teach

  • @ericshelton4045
    @ericshelton4045 Рік тому

    Great examples, thank you

  • @devvvvvvvvvvvv
    @devvvvvvvvvvvv 4 роки тому +2

    Full of lightbulb moments this one

  • @anargyrosstylidis2595
    @anargyrosstylidis2595 4 роки тому

    This video is pure gold. Thanks!

  • @ghouston2712
    @ghouston2712 4 роки тому +1

    Thanks Man! Awesome, learnt so much from this.

  • @JimmyGee
    @JimmyGee 3 роки тому

    Wow. This is excellent stuff. I learned a lot here. Thank you!

  • @igorrebega4853
    @igorrebega4853 4 роки тому

    Really nice, encourage me to try tailwind right away! Thank you

  • @eklavyasharma
    @eklavyasharma 4 роки тому +1

    I love the idea of tailwind and how it works. I have only one concern that it makes my HTML messy.

    • @evans8245
      @evans8245 4 роки тому +1

      .my-custom-class {
      @apply tailwind-class;
      @apply another-tailwind-class;
      @apply have a blessed week;
      }

  • @FreeSkypeGenerator1
    @FreeSkypeGenerator1 2 роки тому

    thanks for the excercises

  • @digigoliath
    @digigoliath 4 роки тому +1

    Awesome! Love it.

  • @mohammedshopan2226
    @mohammedshopan2226 3 роки тому

    This is great 👌

  • @bessimboujebli1076
    @bessimboujebli1076 3 роки тому +1

    in the second example couldn't you just set full height

  • @kamalhm-dev
    @kamalhm-dev 4 роки тому +14

    I wish you show your keystroke, I'd like to learn the shortcuts

    • @samselikoff
      @samselikoff  4 роки тому +5

      Added a new video that covers this! ua-cam.com/video/qIHR2wmxy3U/v-deo.html

  • @damirdine
    @damirdine Рік тому

    amazing video

  • @mattytrane
    @mattytrane 2 роки тому

    This is awesome content, thanks!

  • @NeverCodeAlone
    @NeverCodeAlone 2 роки тому

    Very useful thx a lot!!

  • @lukaslww2671
    @lukaslww2671 4 роки тому

    Beautiful content!

  • @marvin_e
    @marvin_e 3 роки тому

    Top-Notch

  • @Giuseppecarusoplus
    @Giuseppecarusoplus 4 роки тому

    Awesome video @Sam thanks for sharing.
    I fallen in love with your VSCode set up, especially, your Vim/Tailwind/Ember plugins. Would you share it?
    Finally, next time, please, use a an app to show us your key-combo, they are impressive. :)

    • @samselikoff
      @samselikoff  4 роки тому +1

      In case you didn't see it I made a follow-up video on this! ua-cam.com/video/qIHR2wmxy3U/v-deo.html

    • @Giuseppecarusoplus
      @Giuseppecarusoplus 4 роки тому +1

      @@samselikoff I have seen it and thanks for the key logger! :)

  • @mohamedyoussef8835
    @mohamedyoussef8835 2 роки тому

    Awesome video ++++++++++++ 😃

  • @BipinOli90
    @BipinOli90 3 роки тому +1

    Cool

  • @ia.mtzrmz
    @ia.mtzrmz 4 роки тому

    Super cool, thanks 😎

  • @MarcWieland
    @MarcWieland 4 роки тому +1

    Great tutorial. Very interesting.
    P.S: Position your camera somewhere else next time, so you don't always need to change between screen and camera 😉

  • @johnbernalfsd8975
    @johnbernalfsd8975 Рік тому

    Instead of fiddling with margins for Exercise 7 at 54:24 to add gutters, you can also use the gap- utility on the parent flexbox element and save yourself that pain.

  • @VenelinNikolov
    @VenelinNikolov 3 роки тому

    Hi, ~30min, when you deal with these Tab links, everything looks so complex for no reason. You can do the same thing with Pure CSS and could take just few lines of code.
    At some point Tailwind introducing more complexity. But for me the best approach is to use Pure CSS and some Tailwind helper classes for spacing (which also can be achieve with better CSS vars definitions).

    • @delulu6969
      @delulu6969 3 роки тому +1

      This is an old comment, but I wanna add that in Tailwind 2.0, you can just extend active: in your variant so that it won't conflict with hover:. We can now use space utility for consistent spacing of the child elements. The divide utility is also saving more CSS lines. Now, thay have the official form and even aspect-ratio plugins which make this video kinda outdated tbh. I was like you before this, but after playing with Tailwind Play, I'm kinda excited right now.

  • @hueseyinguendogan8541
    @hueseyinguendogan8541 3 роки тому +1

    Nice video thanks!
    Which plugin are you using for sorting the classnames in the HTML file automatically ?

  • @mokhosh
    @mokhosh 4 роки тому

    Exercise 12 was AWESOME :thumbs:

  • @Allyourneedsmet
    @Allyourneedsmet 2 роки тому

    Can someone tell me which top company uses tailwind?

  • @TomHermans
    @TomHermans 4 роки тому +2

    In the first part up until 14' you're using pb-2/3, but I don't see it anywhere in the tailwind docs .. ? What am I missing?

    • @samselikoff
      @samselikoff  4 роки тому +1

      That is an extension provided by Tailwind UI, but you can add it to your own project yourself by extending the spacing scale: tailwindcss.com/docs/customizing-spacing/#extending-the-default-spacing-scale

    • @h.kubilay6160
      @h.kubilay6160 4 роки тому +1

      npx tailwind init --full will give you full config then you can get those values in the config.

  • @amazingVideozs
    @amazingVideozs 3 роки тому

    Thanks for tutorial... but if u want some custom styles do u fall back to old style css

    • @samselikoff
      @samselikoff  3 роки тому

      Yep! No need to force yourself in Tailwind for everything. Especially for one-off UI elements that fall outside of your design system, just use inline styles or vanilla css.

  • @Marvin_Miles
    @Marvin_Miles 4 роки тому +1

    Was trying to find VS Code theme which you use but has no luck. Can you please provide a name of your theme?

  • @arturoidemas9183
    @arturoidemas9183 4 роки тому

    great!

  • @test123ok
    @test123ok 4 роки тому

    When npm install the node_modules, it fails with : Maximum call stack size exceeded

  • @dhrubanka6197
    @dhrubanka6197 2 роки тому

    Coming from react's Styled Components, does it violates Tailwind's philosophy

    • @samselikoff
      @samselikoff  2 роки тому

      I've seen folks use them together before, SC is more about where to put the styles and TW kind of solves that problem but solves other problems too (constrained tokens, design system, etc). I personally don't feel the need for any abstraction on top of TW, using it by itself is the lowest friction way I've found to style an app. If you haven't tried it by itself I'd suggest you give it a shot vanilla!

  • @Srinivaspadma
    @Srinivaspadma 4 роки тому

    @sam: what your thoughts for building grid system as component library: Flex or Grid?

    • @samselikoff
      @samselikoff  4 роки тому +1

      There's still different use cases for each, I think I wouldn't jump to those components but instead start with Tailwind's classes, get to know how to use grid + flex, and extract patterns as they show up. Tailwind's grid classes especially are already extremely useful and relatively high-level so I would see how far I could get with just using them directly.

    • @Srinivaspadma
      @Srinivaspadma 4 роки тому

      Sam Selikoff I’ve used tailwind in a project. It makes any kind of component development breeze

  • @camopy
    @camopy 4 роки тому

    How to make classes reorganize itself?

    • @itsfarookmayne
      @itsfarookmayne 4 роки тому +1

      He's using vscode Headwind plugin for this. In the following video he's explaining his setup. ua-cam.com/video/qIHR2wmxy3U/v-deo.html

  • @ghouston2712
    @ghouston2712 4 роки тому +1

    how do you get the tailwind properties to sort on save?

    • @samselikoff
      @samselikoff  4 роки тому +4

      This bad boy: marketplace.visualstudio.com/items?itemName=heybourn.headwind

    • @ghouston2712
      @ghouston2712 4 роки тому

      @@samselikoff Thanks so much!

    • @stevecastaneda
      @stevecastaneda 4 роки тому

      @@samselikoff Thanks man!

  • @sreekumarmenon
    @sreekumarmenon 3 роки тому +1

    i ran across the same issue mentioned ay ua-cam.com/video/nqNIy8HkEQ8/v-deo.html. . Thanks for the workaround keeping the accessibility.

  • @bachana1231
    @bachana1231 4 роки тому

  • @SalmanAbbas007
    @SalmanAbbas007 3 роки тому +1

    I didn't watch the full video but was unfortunate enough to get a glimpse of 1:15:43 I don't think I'm gonna sleep tonight. Holy fuck. What is going on here? Best practices? Please tell me this is a parody channel...

    • @SalmanAbbas007
      @SalmanAbbas007 3 роки тому

      Why not use the style attribute if you have such a severe case of non-inline CSS phobia?

    • @martiananomaly
      @martiananomaly Рік тому

      What's wrong? Seems fine to me.