6 Advanced Flexbox Features You Probably Don’t Know

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

КОМЕНТАРІ • 140

  • @ducksquidbat8315
    @ducksquidbat8315 2 роки тому +15

    1:45 min in and already able to wipe out a bunch of complexity in my css thanks to gap.
    Really awesome tip! Thank you!

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

      Ikr? When I learnt about gap it's now everywhere. Sometimes I feel like I'm overusing them/using them in the wrong applications but hey! It works

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

      @@hikari1690 yeah, I was just using margins on pseudo classes but this is much easier

  • @sajjadkazemi
    @sajjadkazemi 2 роки тому +66

    Can you make videos about "scroll snap" , "subgrid" and "container query" . Thanks 👍

  • @kyleb8117
    @kyleb8117 10 місяців тому

    Really appreciated the "flex:" command breakdown. I read a guide on flexbox and it sort of made sense but it was really nice to see it in action and explained thoroughly (especially the flex-basis part). Really like the auto margin trick. Gonna try to keep that one in mind for the future.

  • @swanand6300
    @swanand6300 2 роки тому +13

    Last margin auto part will be really helpful.. I am always struggling with this in Hybrid Applications.

    • @wasd3108
      @wasd3108 2 роки тому +2

      what's a hybrid application?
      where would it be helpful?

  • @knight_kazul
    @knight_kazul 2 роки тому +13

    This was super helpful; filled in a lot of gaps in my knowledge.
    Flexbox is truly amazing.
    A video like this about CSS grid would also be awesome.

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

    Wow. Great video. To the point and every second is increasing my knowledge. Thank you so much.

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

    I now understand how the flex-basis works! This should help tremendously in setting up an online store I'm building-Thank You Kyle!

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

    I love this! There are so many times when my CSS gets all complicated to do just one simple thing. Now, with flex I'm able to accomplish what my website needs. Thank You!

  • @clevermissfox
    @clevermissfox Рік тому +3

    Flex grow, flex shrink and flex basis are properties that just aren't sticking with me. This video def helped get me closer though, thank you!

    • @archicoders7560
      @archicoders7560 17 днів тому +1

      The most powerful part of flex is that three

    • @clevermissfox
      @clevermissfox 17 днів тому

      @archicoders7560 haha yes, I am much more useful with th flex properties now 😆 I love flex grow and wrap

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

    Another hit. I'll have to re-watch the flex-basis part a couple of more times 😂

  • @willsoe
    @willsoe 2 роки тому +17

    Can you make a video clarifying how to use images in flexbox? I always find that it's difficult to get the two working together, especially with dynamically scaling images inside flex

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

    Kyle with these BANGERS. keep it up 💪🏻

  • @hudsonsadventures1413
    @hudsonsadventures1413 4 місяці тому

    This is the best video about flexbox's ever dawg thanks so much

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

    The explanation for the flex-basis was actually really helpful because I also thought it was just basically a copy of width just for the flex context. Thanks!

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

    I gave it a like before even watching it, that’s what my expectations are in this channel.

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

    The flex-basis part was so helpful... thanks!

  • @haliszekeriyaozkok4851
    @haliszekeriyaozkok4851 2 роки тому +2

    Only i didn't know writing-mode property but thanks to you i learned it. Also there is worthy details about flex grow-shrink-basis properties way of working, so thank you.

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

      yav hee hee gardas oyle tabii

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

      @@triscuit5103 Sana ve diğerlerine yalan borcum mu var?

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

      @@haliszekeriyaozkok4851 yok tabii hiç olur mu? Hepsini biliyorsundur sen en şampiyon sensin en iyi sensin onu diyorum ben de işte topraaaam

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

      @@triscuit5103 Ne alakası var? Bu kodların çoğunu kevin powell ve netninja kullanırken görmüşdüm. Flex ile alakalı en temel kodları ve "flex-wrap: wrap;" kodunu bizzat bende kullandım. Elbetde bu işi kyle kadar iyi bildiğimi iddia etmiyorum ama adam madem videosunun sonunda "bunların hangilerini evvelce biliyordunuz yazın" mealinde talebde bulunmuş bende ona binaen yazdım. Niye bu kadar hazımsızlık tecrübe etdin onu anlamadım :D

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

      @@haliszekeriyaozkok4851 aşırı iyisin ya müthişsin, bir tek writing mode bilmiyordum diye yazan bir kişi bile yok, en şampiyon sensin rabbime Muhammede yeminler olsun bismilaaaahahahah

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

    This video rocks, having a great time following along!
    However, I'm already a wizard at this just from playing flexbox zombies (covers most of these "advanced" tricks.), but also a shout out to flexbox froggy.

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

    Love this and ur CSS Course.

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

    Hey Kyle, thanks for this video, now I know how to position certain elements in flexbox, which I wouldn't have known without this tutorial. Cheers!

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

    Had no idea on the auto margins and like many, the wrong idea on flex basis. Thanks a lot!

  • @yt-sh
    @yt-sh 2 роки тому

    Thank you for this! Always wanted to know more about flex box

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

    This is absolutely fabulous stuff. I didn't know many of these tricks.

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

    Didn't know about gap. Always thought that was just a css grid thing.
    Thank you!

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

    i finally understand the flex shorthand, thanks 👍

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

    Amazing! Thank you so much. I haven't used flex basis so far but its really helpful, I also didn't know I had to include wrap when I need to justify horizontally.

  •  2 роки тому +2

    Great video. It would be nice if you could have squeezed in how min/max-width and overflow interact with flex-basis. Imho this gets important when using flexbox for positioning components/widgets.

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

    Amazing video! Thanks a lot man!

  • @Human_Evolution-
    @Human_Evolution- 2 роки тому

    Gap is a the only thing useful for me.
    Thanks homie.

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

    I didn't know about the auto margins, very cool.

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

    When you use flex: 1, it is equivalent to flex: 1 1 0%. This means that the element will have a flex-grow value of 1, a flex-shrink value of 1 (not 0), and a flex-basis value of 0%.

  • @ILoveWordPress
    @ILoveWordPress 2 роки тому +9

    The gap property is indeed fantastic, it makes building layouts and grids soooo much easier.
    Twenty years ago people would faint in shock if they would see what modern CSS can do :)

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

    Just in Time when i needed to use flexBoxes, THANK YOUUUU!!!!!!!!!!!!!!!!!!!!!

  • @Landon_Hughes
    @Landon_Hughes 2 роки тому +5

    The flex-basis and width explanation is SUPER helpful!
    Thank you for saving me from future headaches at work ✊

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

    First time hearing in the writting mode . Thanks

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

    Thank you for this. I found you in my journey to discover how to utilize FLEXBOX with an 'On-scroll Sticky Nav' that will 'break' at 760px to hide under the hamburger. I have found info on the sticky, and on the hamburger, but getting them to play together has been eluding me. Of course working til 1am and later doesn't help.
    I'd love for someone to give an explanation on the failsafe way to insert snippets of code, like from github or codepen into a file, and make it work. I know, that's a lot to wish for. finding the right rhythm/path to learning to troubleshoot would be a good topic, maybe?

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

    Please do even more of these !

  • @thecutedreamkostasp.4449
    @thecutedreamkostasp.4449 2 роки тому

    Last tip is priceless thx!

  • @abubakar_bd
    @abubakar_bd 9 місяців тому

    It's a really awesome video. Thank you so much for your video.

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

    it's like the movie inception! Love it!

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

    Awesome content!
    I learned a lot about Flex-basis

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

    Amazingly useful!

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

    Im soooo happy I knew all 6 and its really thanks to you so thank you Kyle

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

    i love the fact that the thumbnail image worked for me haha, really struggle with those flex properties

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

    Brilliant video, thanks!

  • @Kim-by5uy
    @Kim-by5uy 2 роки тому

    I feel happy that I already knew all of these

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

    7:57 isn't flex shrink set to 1?

  • @NedumEze
    @NedumEze 2 роки тому +2

    You're right, flex-basis is mystifying!
    But, you didn't treat like it is: hard to understand.
    Could you do another video on the relationship between element width and its flex-basis? Please.

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

    That margin part was very useful for me

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

    I have done like 16 frontend mentor project and i never used flex shrink/grow/basis
    the thing is i used flexbox for all the project
    i think it's time to use the flex property
    thanks kyle

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

    Wow, the gap property is a game changer for me, time to go refactor a few thousand lines of styles...

  • @pbryan1967
    @pbryan1967 8 місяців тому

    Good to see the mandatory guitar in the background.

  • @Slava-om1sz
    @Slava-om1sz 2 місяці тому

    Is there a way to make boxes 234 jump on the second row while box 1 and 5 stay in the first row when there is not enough space for all 5 of them?

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

    Great content!

  • @mohammed.haydar
    @mohammed.haydar 2 роки тому +2

    I knew all of these properties, but a great useful video anyways ❤👍🏼

  • @leeblackburn3571
    @leeblackburn3571 Рік тому +1

    I thought "flex: 1" sets "flex-shrink" to 1, not 0? (at 7:50)

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

    very useful. thanks

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

    actually you have column-gap and row-gap in flex as well, so you can further custimize these wrapped spacing ;)

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

    Best flexbox tutorial?

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

    Thank you for this content

  • @dr.d3600
    @dr.d3600 2 роки тому

    So much quite awesome skill, how cool you are😎

  • @anvayjain4100
    @anvayjain4100 6 місяців тому

    I will indeed have a good day, thanks to this video.

  • @JaredCaprio
    @JaredCaprio 5 місяців тому

    11:47 Confirmed fixed gear rider

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

    I have been using the gap property for a while really love it. but I found out that it's not supported in internet explorer and Microsoft edge browsers. can you write a good polyfill @supports for it. but wait... @supports isn't supported in those browsers 😅. Kyle say STH Please.

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

    For the flex-basis part, that means changing the flex-basis of the second child to 200px is the same as setting its width only to 200px, am I right? If that's the case, then what's the point of having flex-basis, can't we just use the width?

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

      I think if you set width property, that element will not be able to grow, maybe you can use min-width property.

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

    with flex property set to 1, besides flex-grow:1 and flex-basis-0..... the flex-shrink property is defaulted to 1 instead of 0

  • @abd-ulbasit
    @abd-ulbasit 2 роки тому

    Thanks

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

    Thanks a lot.

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

    Bro, I want to ask for advice, what's good, for those who learn JavaScript, it's better to go directly to node.js or react.js? Or is there still something I still have to learn?

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

      Node is a runtime environment, it’s not really something you have to learn. It just lets you run JS outside of a browser
      I would absolutely just learn vanilla JS before React or any framework. In fact, I would even learn any more strongly typed language before a framework, like C++ or Java. Or even typescript. That way, you’re already thinking more on a low-level and you’re more prepared when you encounter errors, which you will.

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

    Kevin told us about these 😁

  • @pankajbhatt5169
    @pankajbhatt5169 8 місяців тому

    in child elements why he added `flex-wrap:wrap` as it is a property of the container the holds child can anyone enlighten me on this ? video mark 1:35

  • @julien.roques
    @julien.roques 2 роки тому +1

    "You are probably familiar with flex-grow, flex-shrink and flex-basis, but you probably don't know about the shorthand flex property" 👉 well, that is the exact opposite, most people know about flex, but a lot less know about the 3 others.

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

    thank u.

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

    Didn't know about the writing direction thing, was using only flex-direction:column all this while :/

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

    How to set vertical and horizontal gap separately?

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

      You can use row-gap and column-gap ;)

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

    can you please tell me the use case of writing mode

    •  2 роки тому

      It is used if writing in Chinese or Hebrew. It can also be helpful if you have design where text is rotated by 90%. Unlike rotating with tranform it is still participating in layout.

  • @ajiteshmishra0005
    @ajiteshmishra0005 5 місяців тому

    How to center div element in HTML5???

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

    No need for many divs then. Create table with minimal css flex. For Datagrid

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

    Awesome

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

    I use flexbox daily, I thought you can't say nothing new to me, but I was wrong, luckilly :)

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

    You are the Michael Jordan of code

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

    I wish I have this video two weeks ago as one week ago I failed an interview due to I knew nothing about the "gap" T.T

  • @teippiviritykset
    @teippiviritykset 2 роки тому +2

    gap does not work in Safari, that's horrible

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

    🙏🏽

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

    flex basis 😵‍💫😵‍💫😵‍💫😵‍💫😵‍💫

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

    the width of elements for flex should be flex-basis

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

    Love From Nepal ❤️

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

    margin auto rocks

  • @khaled-dev
    @khaled-dev 2 роки тому

    when you are stuck at this exact thing and it gets into you recommendations from heaven 🙏😇

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

    flex-shrink and flex-basis always confuse me.

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

    🙏👍

  • @Anth-ony
    @Anth-ony 2 роки тому

    I couldn't get past you spelling out R.E.M. instead of just saying "REM" lol.

  • @leonelcenteno3816
    @leonelcenteno3816 5 місяців тому

    Hi there, needless to say how much I appreciate your content. However, I'll be great if you could throw in some real examples, or small project of your own that showcases these techniques.

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

    I've written too much CSS didn't see anything new 😢... .box:nth-child(3n+2){margin-left: auto;} for that last example

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

    Hey Kyle i think king of css is watching this i'll ask for batle😀😀😀😀😀😀

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

    100%

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

    REM is better than PX. :3

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

    Mind the gap!

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

    this doesn't sound like something advanced to me.. do people really miss this things about flexbox?

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

    Dear brother : I saw your videos all are very useful to me grow my career, but u speak speed, please speak little bit slow some times i can't understand your words, because I am from non native English speaker basics , This is my kind request.