Responsive CSS Will Never Be The Same

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

КОМЕНТАРІ • 229

  • @taofeeqomotolani2311
    @taofeeqomotolani2311 Рік тому +37

    Finally a good explanation. I have been so lazy to read the CSS specification for this and with this video, it would be so much easier to read and understand the power of the feature better

  • @moominjuice2
    @moominjuice2 Рік тому +65

    Love the pace, examples and explanations. Really great teaching style. Your series on CSS has really got me back into doing some web development. Things have moved on quite a bit from when I was building sites 20 years ago... thankfully!

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

      What, you don’t miss all the tables?

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

      @@Nefyoni Ha ha... not one bit. Mind you 90% of the world was on IE and running desktop 1024x768 so tablets, phones, watches, TVs, fridges etc were but a fantasy. To think most JS files would take several seconds to download on a 28k modem is unimaginable to this new generation of devs.

  • @metric152
    @metric152 9 місяців тому +4

    This video solves a huge missing piece I had for this new css. Thanks for a concise great example

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

    I can't wait for this to be fully supported, it's exactly what I've been missing. It makes so much sense to allow an element to be responsive to it's parent container. This is going to make writing components waaaaay easier

  • @marie-elizeventer7080
    @marie-elizeventer7080 Рік тому +2

    This is GREAT! Thanks! I have been struggling with media queries the WHOLE afternoon!

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

    is not a side-bar container, it is a semantic element not visual. It means that it's related to the main content of a parent, but not an essential part of it.
    Footnotes of an article, for example, is an .
    Aside from that, good news.

  • @Hobbitstomper
    @Hobbitstomper Рік тому +48

    In reality it will be 5-10 years until this is acceptable in live production websites due to backwards compatibility for older browsers. Personally I think we should wait no longer than 1 year to implement new CSS/HTML features. Anyone using a browser that has not been updated in a year has bigger issues to worry about other than missing CSS/HTML features.

    • @Davidlavieri
      @Davidlavieri Рік тому +6

      Nowdays difficult to have obsolete browsers they all now auto update, edge cases on some licensed software offices perhaps but those people aren't they to browse the web to look at how cool your site is. Target audience matters most, mobile is now dominant too

    • @Hobbitstomper
      @Hobbitstomper Рік тому +8

      ​@@Davidlavieri Don't forget phones and tablets. For example on iPhones and iPads, Safari and Chrome is tied to the version of iOS, and iOS is tied to the generation of the device. So if Apple decides they will no longer release an iOS version for iPhone 9, then you won't be able to update Safari and Chrome on older iPhones and iPads. Similar situation with Android phones and Amazons kindle.

    • @fanzypantz
      @fanzypantz Рік тому +6

      Yea its about 75% support right now. That is one in every four people will get an issue.

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

      @@Hobbitstomper iPhone 9? That's the one that came after the iPhone 2.

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

      Most updates will just happen in the background. In reality though thousands of businesses worldwide just can’t afford an os upgrade every time MS brings one out. It’s very time consuming, can affect thousands of users and often brings problems. Because of that you have work users using old browsers because it can’t update any higher due to the os. Problem with many developers is they design for their device. That’s a world away from, say, a hospital running thousands of users with Win7 and ie11 because their budgets can’t afford the upgrade.

  • @ДмитрийКарпич
    @ДмитрийКарпич Рік тому +11

    Nice feature, thanx for sharing and clean explanations. It`s seems like 73% on caniuse - so, it's appropriate for pet project and concepts - it's really cool.

  • @maximejeanpierre922
    @maximejeanpierre922 Рік тому +43

    Not supported on Firefox yet, so difficult to use in projects for actual clients yet :(

    • @OpenJavaScript
      @OpenJavaScript Рік тому +8

      Yeah, he should have mentioned this!

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

      Unfortunately, Firefox is becoming the new IE.

    • @none-ro9dz
      @none-ro9dz Рік тому +3

      @@karlheinzneugebauer true, but what else am I supposed to use?? the other options are chrome, actual IE, and a bunch of gamer trash chrome derivatives

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

      @@none-ro9dz I'm in the same situation. I love FF for what Mozilla has achieved years ago. Now they're behind the spec or acting weird when it comes to hardware APIs, which I need for my work. That's the reason why we chose to have Chromium based browsers as requirement for our software. Sad.

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

      You can use a polyfill

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

    This is the 4th or 5th video on container response css, and I'm trying to figure out why all the previous ones before I got to yours, just never really made it clear to me.
    In the first minute, your explanation crystalized exactly what the purpose of this is for.

  • @0xAndy
    @0xAndy Рік тому +213

    No Firefox support sadly makes container queries a dealbreaker.

    • @Zero-oq1jk
      @Zero-oq1jk Рік тому +31

      Yeah, we should brake the deal with Firefox. Like they did with own CEO for not being 'woke'.

    • @ichijofestival2576
      @ichijofestival2576 Рік тому +27

      @@Zero-oq1jk Now, there's an intelligent argument from a clearly intelligent person. Let's listen to him. (Clearly a 'him.')

    • @redpillsatori3020
      @redpillsatori3020 Рік тому +15

      Who uses FF anymore anyways? It uses WAY more memory than Chrome/Brave, which is saying a lot.

    • @redpillsatori3020
      @redpillsatori3020 Рік тому +7

      @@Zero-oq1jk ..ha! I didn't know about that. I really want to use FF, but the excessive RAM use kills it for me. Aren't all CEOs going "woke" nowadays?

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

      @@Zero-oq1jk Money follows the times, you're just gonna get left behind you edgy bastard

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

    You are a godsend. Thank you for what you do!

  • @kahnzo
    @kahnzo Місяць тому

    I need this right now. So cool!

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

    I haven’t even watched the whole video yet but I’ve already hit the like button. It’s the first thing I do Kyle. Love your content

  • @jatinkukreja18
    @jatinkukreja18 Рік тому +7

    waiting for browser support 👀

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

    Loved this! Your videos are the best

  • @kjul.
    @kjul. Рік тому +12

    This is so great! While from my experience you can achieve the same behavior with flex and the CSS clamp function, this is much more readable and there are most likely even more advantages. 🙂

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

      If you use react/svelte or any component framework. This is very amazing. Don't be worried about where it will be putted but style it from it's width and height (not viewport is amazing).
      But isn't supported everywhere so I will use it only in my side projects
      Especially in svelte which have a more friendly css way to write it than react

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

      Any videos on this?

    •  Рік тому +1

      Css clamp shouldn't be able to give you this. Css tricks has a technique called The Albatross, but that doesn't really work in a complex real world scenario either. Container queries are way to go.

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

    Never thought I’d see the day when svelte is mentioned with react but not angular. The future is bright!

  • @henrique-work
    @henrique-work Рік тому +1

    Amazing video & tip, I can already see a lot of possibilities with this feature XD

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

    Display flex in the container and flex-basis in its children would to the trick, no big deal.

    • @kresuu3567
      @kresuu3567 Місяць тому

      Fuck flex-basis all my homies love @container

    • @BliitzPint
      @BliitzPint Місяць тому

      It's "would DO the trick". Thank me later.

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

    I just found out about container queries yesterday. I can't wait for the tech to be adopted into browsers without user intervention.

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

    02:16 - He has containers that contain his information.
    Edit: Really like your videos, simple and easy to understand.

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

    A neat feature that somewhat simplifies things but as others have already said, it will need a few years before we can actually start using it. Good to know of its existence atleast!

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

    Oh men.... It's never a wasted time with your tutorials

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

    yhe only problem it’s not supported by most of the browsers

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

    Hey Kyle, I really enjoyed your video on container queries! The card designs with CSS looked nice!. However, it seemed some CSS parts weren't fully shown. Could you possibly share the complete CSS for the cards? I'd love to demonstrate this concept to our company's designers. Thanks a lot! 👍

  • @mohd.maasir8198
    @mohd.maasir8198 11 місяців тому

    Thanks for the amazing explanation

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

    Thanks! Your videos have been a lot of help!! Also, could you please do a video on SSL and Certs, that would be wonderful

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

    hopefully firefox support will arrive sooner than later... really want to use that but can't really right now :(

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

    Amazing!!! Thank you :)

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

    What’s the difference between be setting the .card width to 50% vs 50cqw?

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

    Thank You for great explanations :)

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

    I am still looking for this feature too be implemented in all major browsers. We needed to help us out with resize observers a few years ago. This will be much more efficient.

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

    thank you ❤❤❤❤❤❤ I'm still waiting for the 'subgrid' and 'scroll snap' . ^_^

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

    not yet there, but really close to production use.

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

    I had always wanted this feature

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

    Wonder if :has can perform the same thing. Also wonder if @container works the same within Web Components if the component is utilizing the Shadow DOM.

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

    Dude, the intro was EPIC 🤣🤣🤣🤣🤣🤣🤣🤣🤣🤣
    Btw, using queries in SCSS files is actually so easy and you can somewhat mimic container queries this way because all of the nesting is gone since sass is doing it for you.

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

    Very cool lets see how fast other browsers adapt it.

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

    That's awesome! Thank you ;)

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

    Are container queries supported by browsers?

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

    This is a better example than MDN docs 😂

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

    Sir please can you make a video on how to design the polaroid cards, together with the cool image transformation.

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

    this will be great in a few years when its supported across all browsers

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

    0:33 What changed about Kyle's humor while I was gone 😂😂😂

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

    awesome I have a current project that can use this

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

    Very great explaination! ;)

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

    Or you would make default cards as vertical and apply the horizontal responsiveness only to main content..

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

    Nice tutorial. The only problem is that browser support of @container is only 80%. It is loo few / low.

  • @kirkanos771
    @kirkanos771 Рік тому +4

    How ironic that DIV tags were intended to be container boxes back in the days. Instead of reusing DIV and attributing new properties, we had to add new explicit container semantics.

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

      I think that adding container semantics makes things easier as you can set specific breakpoints on an element by element basis instead of it being exclusive to the div element.

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

      What you just said about div tags representing containers just made the concept click in my brain just now. Thank you!

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

    The video is great. I noticed that the word "terrible" was dimmed at the start. Is UA-cam really censoring that word also. It is almost getting impossible to make a video these days. "Only positive sounding words allowed"

  • @1980empang
    @1980empang Рік тому +1

    is there any mdn documentation about css ? and it's update features ?

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

    Mind blowing 🤯

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

    I seem to have missed a vid between the setting up the card and this vid where they went over getting the header on the left vs on top

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

    Many blessings! 💪😉

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

    I dunno why I click the vid immediately when I saw the thumbnail...

  • @NikitaDrokin
    @NikitaDrokin Рік тому +4

    "Welcome! My name's Kyle, and my throat feels like I ate 100 pounds of sandpaper for breakfast, so if I sound like a dying walrus, I apologize."
    I love how, when people have a sore throat, the first thought that pops in their head is a dying animal 😂

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

    wow finally! It was so annoying doing "width: 80%" and guessing 80% of what.

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

    Is this ready to use in production? Or still slowly rolling out to browsers?

  • @ferhataltundal
    @ferhataltundal Рік тому +9

    What about older browsers? And what browser versions will this feature support?

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

      caniuse to the rescue

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

      firefox doesn't support container queries yet.

    • @Dev-Siri
      @Dev-Siri Рік тому

      forget about the old.
      *IE*

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

      @@Dev-Siri Internet Explorer is officially dead since over 4 months now. Nobody should support it anymore whatsoever.

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

      About 75% of modern browsers support this feature

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

    How good is browser support ?

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

    What is difference between your UA-cam channel css videos and the css course on your website?

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

    Game changer!!

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

    What's the best place to find out new features like this?

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

    Wowww awesomeee !!!!

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

    still beautiful dev, couldnt focus on the code idk why

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

    thanks

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

    What about browser compatibility?

  • @fase8729
    @fase8729 7 місяців тому

    Can I ask why you don't use scss?

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

    great video, do i still need Sass after this feature or i still didn't get the idea behind Sass ?😅

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

      You don't need SASS. CSS custom properties and `:is()` makes the pain of precompiling SASS not worth it.

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

    Which browsers currently support this?

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

    when will this feature be available to all browsers?

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

    Nice, thx.

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

    How did you style the side bar?

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

    thank you♥♥♥

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

    I can't get container queries working at all visual studio code has a red line under code. Can you help. Not working and the code was copied exactly.

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

    What has precedence, @container or @media?

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

    this is part of transition to web components and , a little more abstract, to microservices.

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

    Is there a shim for older browsers?

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

    Mate, you are doing an incredible job, .

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

    what if I follow mobile first design means min-width how to use this container

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

    Ginger, Garlic and something citris like orange, lemon or pineapple. Add some honey and cinnamon for flavor. Boil that, it does taste a little off some folks like it though, and drink it hot. That will help your throat for next time brother.

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

    does FF already support this?

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

    Do all browsers support container query?

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

    Wow big like! I'm 3 y.o. FE developer and that's very interesting

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

    Great!

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

    Whats the browser support for container queries? I see it not being supported in android FF, samsung internet, opera mini etc.

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

    Wait. . . there should no longer be media queries, then, given that the body can be considered a container.

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

    I just use TailwindCSS and have 200 classes per element, no biggie

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

    A request as a subscriber and regular user....can you please zoom in your code to be visible in cell phone screen. It's not legible.

    • @thorn-
      @thorn- Рік тому

      One might assume that the target audience owns an actual computer, that they code on, with a screen larger than a phone.

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

    Greetings, I have tried to use the @container API in my Angular Project but for some reason its not even showing up in my IDE. Has anyone else had this issue before?
    I would really love to use it since it seems amazing to work with but its not even highlighted as a query :(

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

    CAN TAILWIND DO THIS YET???

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

    Does this work in codepen?

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

    I want the little red house.

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

    I was really excited, but I don't like this implementation they've gone with.
    I can see why Firefox isn't supporting it.

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

    your vs code needs update it asks in the corner :)

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

    Me: Ahhh Saturday - my day for mindlessness
    *Sees this video*
    Me: WHY MUST YOU BE SO USEFUL?!

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

    At the time of this video release, this is not supported in Firefox (with nothing on the roadmap). WOMP WOMP.

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

    Wow🔥🔥

  • @Vthoen
    @Vthoen Місяць тому

    Nice Intro