Learn CSS Subgrid in 14 minutes

Поделиться
HTML-код
  • Опубликовано: 3 май 2024
  • 🚨🚨🚨 COURSES - slayingthedragon.io 🚨🚨🚨
    Join the discord - / discord
    In September of 2023, Subgrid, a new CSS feature gained official support across all of the major browsers, allowing grid-items with their own grid, to inherit the rows and columns from the parent grid.
  • НаукаНаука

Комментарии • 134

  • @willb.r2055
    @willb.r2055 27 дней назад +62

    does anyone else likes to use flex on everything unless they absolutely need to use grid or is it just me ?

    • @jeremywinston1
      @jeremywinston1 23 дня назад +6

      i think everyone is like that.

    • @SogMosee
      @SogMosee 22 дня назад +8

      I use grid for everything except for buttons next to text, text next to text, or headers with an element on each side, then I use flex. Otherwise grid all the way baby. Maybe it's just the way our brains work differently...

    • @jkovert
      @jkovert 20 дней назад +4

      Flex first here.

    • @lashious236
      @lashious236 19 дней назад +2

      i also 😂😂😂

    • @whyisthiscodenotworking
      @whyisthiscodenotworking 18 дней назад +5

      I use flex , because I don't know nothing in grid 😅😂

  • @Abid-if5fh
    @Abid-if5fh Месяц назад +54

    The comeback of a legend ..

  • @TheThirdWorldCitizen
    @TheThirdWorldCitizen Месяц назад +14

    Thanks.
    I didn’t appreciate subgrid until I had to work with named grids that had sticky headers

  • @yosefff19
    @yosefff19 Месяц назад +6

    I was rewatching all your previous posts and got so excited when I saw your new upload!

  • @pazzuto
    @pazzuto 24 дня назад +4

    Just found your channel and I really like your videos and the way you explained. As you talk about grid/subgrid, it'd be great to see a video of one or more popular templates out there (header, aside, main, footer, etc.). I'd love to see your approach.
    Thank you for the awesome videos.

  • @MarlDenzellSilva
    @MarlDenzellSilva 8 дней назад +1

    you're just too good at writing css, you never failed to impress me

  • @elasticoGomez
    @elasticoGomez Месяц назад +4

    This is exactly what I’ve been looking for! Great content sir

  • @jykata7134
    @jykata7134 Месяц назад +2

    Thank you, for the helpful information! Keep making these great videos!

  • @zack288
    @zack288 Месяц назад +8

    He’s coming back on 100k. Congrats

  • @alyssapuype732
    @alyssapuype732 Месяц назад +2

    I just watched your other videos for the 10th time. Amazing how you just uploaded one again! Waiting for the javascript course!

  • @ThelndraS
    @ThelndraS Месяц назад +2

    🎉Wow, I finally saw your new work after such a long time. Very good tutorial~❤

  • @longyuanchuan
    @longyuanchuan Месяц назад +2

    Wonderful... This tutorial has five stars to me, it's concise, well explained, illustrative, and leaves nothing unchecked... Applause

  • @danrowllet
    @danrowllet Месяц назад +2

    amazing tutorial as always thank you!!

  • @extremeboysmart
    @extremeboysmart Месяц назад +1

    Thank you! Your explanation are great!🎉

  • @N1rOx
    @N1rOx Месяц назад +3

    great to have you bacK!

  • @semperprimum26
    @semperprimum26 Месяц назад +1

    What an amazing tutorial. Thank you!

  • @AbubakarsadiqIdris-mz5fq
    @AbubakarsadiqIdris-mz5fq Месяц назад +2

    Thanks bro I always enjoyed ur tutorials

  • @BrentTech
    @BrentTech Месяц назад +6

    Superb explanation! Thanks. The only thing I'd suggest is for more explanation on what things like the 1/4 and 1fr and such mean.

  • @MrAndi1281
    @MrAndi1281 8 дней назад +2

    Awesome Video with a great explanation!!

  • @ashutosh_tiwari
    @ashutosh_tiwari Месяц назад +3

    Wonderful explanation buddy!! Keep up the good work.❤️

  • @issa_the_ghost1257
    @issa_the_ghost1257 Месяц назад +2

    First off, congrats on 100k 🥳
    Secondly, I didn't even know that this feature existed!!
    I usually just make nested grids or use Bootstrap. So thanks for the info !!

  • @Caprice_08
    @Caprice_08 Месяц назад +2

    I needed that so much🎉🎉

  • @andinuruljihad2912
    @andinuruljihad2912 Месяц назад +2

    whoa this feature is incredible... great explanation, too.

  • @tanis6371
    @tanis6371 День назад

    For this partcular layout you can use flexbox to push the images at the edge of their containers, you just have to use flex-direction:column; and margin-top:auto;

  • @edwassermann8368
    @edwassermann8368 Месяц назад +1

    very nice work. thank you!

  • @mostafahamed8188
    @mostafahamed8188 9 дней назад +1

    Your videos help me alot thank you

  • @senseislade
    @senseislade Месяц назад +2

    finally, you've kept us waiting Ramzi

  • @deltaranzyd1587
    @deltaranzyd1587 Месяц назад +3

    wow, the legend is back

  • @brentguiao4861
    @brentguiao4861 25 дней назад +1

    Great explanation thanks❤

  • @chrismachabee3128
    @chrismachabee3128 Месяц назад +1

    Truly a greeat lesson. Fantastic. Very uunderstandable aand vitally important thank you.

  • @ichiroutakashima4503
    @ichiroutakashima4503 Месяц назад +1

    This channel definitely slayed!

  • @yacobee
    @yacobee Месяц назад +1

    Very useful. Thank you.

  • @Sammorris207
    @Sammorris207 21 день назад

    thanks for the clear explanation

  • @kaiso69
    @kaiso69 27 дней назад +1

    Thank you man please upload more video about CSS Like building actual project from start to end

  • @abdurrobr34l
    @abdurrobr34l Месяц назад +2

    After a long time got ur video... 👍👍

  • @imtseku
    @imtseku Месяц назад +1

    Nice to see you again ✌

  • @godofwar8262
    @godofwar8262 Месяц назад +2

    Dragon is back 🔥

  • @Filaxsan
    @Filaxsan Месяц назад +1

    Very useful!! 💪

  • @user-eo1vz9lt8g
    @user-eo1vz9lt8g Месяц назад +1

    I bought your CSS course and it was a good investment, learning to use a page builder and Wordpress but knowing what the page builder is built upon is extremely helpful, of course it's not just CSS but since the builder lays down the HTML and Javascript and PHP, you can go a lot further if you can use custom CSS, looking forward to your vanilla Javascript course...

  • @genshingamer8361
    @genshingamer8361 Месяц назад +2

    What a great day when your video comes
    Thnx bro also expceting more new videos and your new courses also stay heathly.:)

  • @ShahriarCode
    @ShahriarCode Месяц назад +2

    man it was really helpful for me becuase i always faced prblems here

  • @harshalmali856
    @harshalmali856 Месяц назад +1

    awesome video gained something new

  • @sadeemdzakaria3005
    @sadeemdzakaria3005 29 дней назад +1

    You are one of the best CSS teacher on yt

  • @hriso83
    @hriso83 Месяц назад +1

    The best tutorials for learning css

  • @ShahriarCode
    @ShahriarCode Месяц назад +1

    ayooooo the king is back ⭐⭐

  • @ZockaRocka
    @ZockaRocka Месяц назад +1

    This was perfect 👌

  • @FumezCreates
    @FumezCreates Месяц назад +1

    The master has returned 😤

  • @mohsinahmedohi
    @mohsinahmedohi Месяц назад +1

    Worth subscribing you.

  • @codewithzero
    @codewithzero Месяц назад +1

    thats great. thanks dear

  • @JeffParker45
    @JeffParker45 Месяц назад +1

    Very Good! 👏👏👏

  • @jackright9530
    @jackright9530 29 дней назад +1

    Great video

  • @mansulol5458
    @mansulol5458 28 дней назад +1

    the king is back 😭🙏🏾🙏🏾

  • @mirjalol49
    @mirjalol49 Месяц назад +3

    U are back

  • @Dylan_thebrand_slayer_Mulveiny
    @Dylan_thebrand_slayer_Mulveiny Месяц назад +1

    We've come so far from the good old days of 'float: left' and clearfix hacks.
    The old way of doing layouts like this involved a lot of nesting with flex, but it was clunky as hell. This new approach is really awesome. However, as of today Caniuse puts browser support for this feature at 88%, which is quite low for it to be used in production.

  • @okon1624
    @okon1624 12 дней назад +1

    Impressive 🤎

  • @imredoyyy
    @imredoyyy Месяц назад +1

    Welcome back ❤

  • @AyaanMahib
    @AyaanMahib Месяц назад +1

    Love your videos ❤❤❤❤

  • @Igor-vk8fl
    @Igor-vk8fl Месяц назад +1

    SO SIMPLE!!! OMG

  • @hudojnik93
    @hudojnik93 Месяц назад +1

    Do you have any idea how good your channel is and you only have 14 uploads so far? I have ADHD and you are the only I can actually understand.

  • @royandescartes
    @royandescartes Месяц назад +1

    The GOD off CSS

  • @sierraoscardelta
    @sierraoscardelta Месяц назад +1

    epic.. didn't know of this .. now to undo my horrible hacks

  • @heavylog1c
    @heavylog1c 6 дней назад

    I think this is possible with flex. You just wrap this boxex with flex item, make boxes stretch vertically. And then align images to the bottom. But this subgrid thing looks pretty cool.

  • @andyl9920
    @andyl9920 15 дней назад

    Geez u make it look so easy. And great explaination! I guess media queries is really not needed. Question tho. How do i move an image that is on the right side of the viewport to go above the text on the left side when viewing in smaller screens? So normal size/big screen Text and Image will be next to one another. Please help

  • @timothyshiu2263
    @timothyshiu2263 Месяц назад

    wonderful!
    Does subgrid work with any number of nested-grid-that-use-parent-grid,
    for example, `div.grid > div.subgrid1 > div.subgrid2`?
    does subgrid also work with `grid-template-columns: repeat(auto-fit, minmax(..., 1fr))`?

  • @albedesigns
    @albedesigns Месяц назад +1

    Great Video!

    • @harunyussuf3593
      @harunyussuf3593 Месяц назад +2

      You replied 1 min after video uploaded. Watch it first

  • @Mike-rt2vp
    @Mike-rt2vp Месяц назад +1

    I can't believe it's taken so many decades to get this far for creating layouts using CSS.

  • @kirbyenriquez5417
    @kirbyenriquez5417 Месяц назад +1

    wow .. thank you
    :))))

  • @krateskim4169
    @krateskim4169 Месяц назад +1

    best explanation

  • @Kronical_Lpd
    @Kronical_Lpd Месяц назад +2

    another super clean tutorial, I could not have explained it better! Glad to see you back my guy!
    Classic Ramzi recording at 1am

  • @horatiuranca9005
    @horatiuranca9005 Месяц назад +1

    perfection

  • @krishjain1239
    @krishjain1239 Месяц назад +1

    Please tell about how to use masonry library with sidebar on a webapp.

  • @user-gy5sm4bd2m
    @user-gy5sm4bd2m Месяц назад +1

    Я не знаю кто ты, но ты объяснил все за 14 минут лучше, чем наши "разработчики" объясняют это все за час. Спасибо!

  • @FadliAlamsyah
    @FadliAlamsyah Месяц назад

    13:31 with style css like that, how to handle view if only one grid item?

  • @giahuybui8323
    @giahuybui8323 25 дней назад

    I added another lorem to the first box and it's width started to be bigger than the other boxes. And even with the span 3 and minmax(350px,1fr) if i add more lorem, one of the boxes starts to grow and display on top each other ;( .Can anyone explain why? ;(

  • @themarksmith
    @themarksmith 20 дней назад

    useful sh*t - thanks!

  • @endlacer
    @endlacer Месяц назад +1

    very nice.
    some Feedback:
    -mute or at least make the type sound quieter
    -bit faster pace would be nice. you sometimes Show stuff that does not matter (like that you can change the color of the grid overlay in the devTools), you said it urself 😅
    - eg padding the body does not belong in this video. it has nothing todo with subgrid
    keep up the good work :)

  • @anonmityslayer
    @anonmityslayer Месяц назад +1

    Finally legend got his password correct

  • @RB_MAFIA
    @RB_MAFIA Месяц назад +6

    come back with React 🔥🔥 please

  • @reydantegarcia8776
    @reydantegarcia8776 Месяц назад +1

    HEEYYY welcome back

  • @ImprovingAryan
    @ImprovingAryan Месяц назад +2

    teach us mern stack please

  • @mrshahcloud
    @mrshahcloud Месяц назад

    Hi, what does the "span 3" means? Thanks.

  • @hamzamohammad01
    @hamzamohammad01 Месяц назад

    I was just thinking of doing margin-bottom: auto

  • @kudorgyozo
    @kudorgyozo Месяц назад +1

    and what about making each item display: flex and setting flex-grow: 1 on each paragraph?

    • @slayingthedragon
      @slayingthedragon  Месяц назад

      Yea that's what I personally do, subgrid though is great if you're using grid

  • @ohtpz
    @ohtpz Месяц назад +2

    Hes back??

  • @kc499z3
    @kc499z3 Месяц назад

    Hi, do you plan offer local prices for your courses? I would love to buy the css one, but my currency is weak compared to dollar.

    • @slayingthedragon
      @slayingthedragon  Месяц назад +1

      I don't, however in about a month my CSS course will be uploaded to my RUclips channel, it'll be free for everyone

  • @zekimertdik7364
    @zekimertdik7364 Месяц назад +1

    We missed you so much bro. Please prepare better next time. Slaying a dragon shouldn't take this long.

  • @AlThePal78
    @AlThePal78 19 дней назад +1

    I am confused, why not 1/3

  • @FahadKhan-vt5nc
    @FahadKhan-vt5nc Месяц назад +1

    Please make videos on javascript

  • @luankosaka
    @luankosaka 21 день назад

    Is it possible to do the same thing with flexbox?

    • @slayingthedragon
      @slayingthedragon  21 день назад +1

      Yes but it requires more divs in your HTML codepen.io/ramzibach-the-styleful/pen/QWPvYKq

  • @alexfurtado1759
    @alexfurtado1759 Месяц назад +1

    Slaying Thank you !!! Now you talking really slow... I can flow alone nice

  • @ericsanchez2581
    @ericsanchez2581 Месяц назад

    Why did the span 3 work vs 1/4?

    • @slayingthedragon
      @slayingthedragon  Месяц назад

      1/4 explicitly anchors your element into place, whereas span 3 doesn't. They're both similar but span is more implicit which is what you need to make auto-fit and subgrid work together.

  • @edems131
    @edems131 Месяц назад +1

  • @devxsadik
    @devxsadik Месяц назад +1

    more sheez like this pls

  • @timtim9o5
    @timtim9o5 Месяц назад

    you didn't explain the 'span 3' directive

    • @slayingthedragon
      @slayingthedragon  Месяц назад

      It spans an element 3 rows, what is there to explain?

  • @Rio-by1eh
    @Rio-by1eh Месяц назад

    Is a Grid a STACK…here ?

  • @sethhendrikz6949
    @sethhendrikz6949 Месяц назад

    Can someone please explain the 1/4?

    • @slayingthedragon
      @slayingthedragon  Месяц назад

      grid-row positions an item on yours rows. 1 / 4 positions an item starting from the first row line up to the fourth row line.

    • @sethhendrikz6949
      @sethhendrikz6949 Месяц назад

      @@slayingthedragon aha! So forgive me for extending the question but a 1/2 with four box elements, what would this do?

    • @slayingthedragon
      @slayingthedragon  Месяц назад

      @@sethhendrikz6949 It would display only one element in your box while leaving any other element out of sight. 1 / 2 only represents one row, and with our boxes having 3 elements inside of it, it needs to span 3 rows. If we have 3 rows than we have 4 row lines, which is why you use 1 / 4. This is something done automatically usually but subgrid doesn't position items on tracks implicitly, so you tell your boxes how many rows it must span. If you tell it to span 1 / 2 rows, than you're telling your boxes to occupy one row only and therefore only one element out of 3 can be displayed.

    • @sethhendrikz6949
      @sethhendrikz6949 Месяц назад +1

      @@slayingthedragon an absolute genius teacher, thank you dragon! Big ups and a confident sub 🙏

  • @avrakadavra1552
    @avrakadavra1552 29 дней назад

    Is it just me? this doesn't work with 2 or more rows. Still, Thank you for this

  • @helluci6449
    @helluci6449 Месяц назад

    please start using dark mode

  • @jippee1
    @jippee1 17 дней назад +1

    Why would this be returned to the design team looking nothing like the prototype. It boggles my mind when the programmers can't just match the design 1 to 1 before sending it back

    • @mitigozman-pop2
      @mitigozman-pop2 8 дней назад +1

      This is sarcasm right? The amount of absolutely overcomplicated designs I had the disgust of seeing is waaay too high. Maybe, just maybe if designers thought about how their design would be implemented instead of thinking they are the next Michelangelo, they could keep the design simple enough so it can be implemented both quickly and correctly.

  • @rabbitcreative
    @rabbitcreative Месяц назад +1

    The same effect can be achieved with tables. Just saying.

    • @tefkah
      @tefkah 29 дней назад +1

      who the hell wants to go back to tables man