It's been 2 years since I started following your channel & I never regretted doing so. I just feel blessed having such a great teacher by my side❤❤. Lots of love to you Kevin. May you get 20M subscribers on KZbin. Keep up the good work. Supporters like me will always be by your side😊😊
@MattDunlapCO Жыл бұрын
@KevinPowell this is the best subgrid demo I've seen to date. I think a "can-i-use" video explaining how to decide when a new feature is safe to use would be helpful. Also, maybe a regular segment just reviewing the state of features we're waiting on (color-mix, subgrid, container queries [size and props], anchor positioning) from relative usage to feature ticket progress would be amazing.
@KevinPowell Жыл бұрын
So glad that you enjoyed this one :D - Also, a quarterly check-in on the state of new CSS features could be a good idea!
@clevermissfox Жыл бұрын
Gah anchor positioning is gonna be 🔥
@safie01 Жыл бұрын
Que satisfatório ver os items se ajustando, ver tudo funcionando assim me deixa "🥺 I'm amazing".
@gknt7234 Жыл бұрын
One of the best CSS videos in 2023. It's like a recap video, Google should use this on their websites!
@MM_Sheehan Жыл бұрын
One of the best things about watching these videos is catching Kevin's excitement about new features. Don't ever change.
@tonyr.6637 Жыл бұрын
Brilliance all around! Nice to see such a great combo of subgrid and container queries and native CSS nesting! Thank you 🙏🏽
@KevinPowell Жыл бұрын
Thank you so much! Really generous of you!
@yickysan Жыл бұрын
Came from a data science background and fell in love with fronrend because of you.
@alimansimov19293 ай бұрын
Alright, you are truly the CSS King.
@daveden2 Жыл бұрын
wow, I never thought about using the grid-auto-rows like that... coupled with the subgrid. I'm learning a lot from Kevin every day
@nicholasgillespie70813 ай бұрын
You're a healer Kevin... Thanks
@vlad_gabor Жыл бұрын
I've been using flex for most of my work but after seeing this video I might switch to grid and containers. Awesome work you've done!
@igordasunddas3377 Жыл бұрын
Same actually. I really think I have a good understanding of how to get stuff to display nicely using flexbox, even for RTL languages, but this looks very interesting and promising and when I finished the video, I definitely wanted to give another thumbs up to it. Awesome work, Kevin!
@clevermissfox11 ай бұрын
Note- container-type: inline-size is incompatible with subgrid; they cannot be on the same element
@darvil82 Жыл бұрын
I never knew how powerful subgrid was until now. Thank you!
@amaury_permer Жыл бұрын
Is funny that I was working with subgrid yesterday in a similar way and then you upload a video about the same, great content as always!
@winningtech5 Жыл бұрын
love how he uses, the latest css properties now. i watch your videos but when i start coding i forget about these new features and fall back to the old way i write css.
@mkm_ Жыл бұрын
Really great demo of subgrid and container queries, just the memory refresher I needed. Looking forward to using these features now that they are better supported.
@Shaheer-xs5os Жыл бұрын
This man is awesome, he always have something new
@VasilyPavlik Жыл бұрын
Ohhhhhh. After each of your videos I walk for hour or two around and think how I can use this knowledge. But today I was searching for this knowledge in many places. And only place I've found all answers is here. How did you know what I wanted?
@danielgago-sk Жыл бұрын
Perfect. Subgrid and 100dvh ist perfect solution for many of my problems with design or displaing web page on mobile devices... 👍
@ronpalmer7260 Жыл бұрын
I had this issue with my blog post cards. I got it to all line up but it took a lot of guess work and trial and error. I like this solution.
@daveturnbull7221 Жыл бұрын
Miriam Suzanne gave a great explanation/demo of when and why some parts of CSS break over on Learn With Jason. Really interesting talk about how the whole CSS Working Group thing works.
@CZghost Жыл бұрын
This is so useful for my sharepoint subsite in the making. Thanks.
@PacificDev Жыл бұрын
I am always amazed by your videos🎉
@clevermissfox Жыл бұрын
Would love some context and a demo on animating grid some day!
@LukeDorny Жыл бұрын
I love adding a :last-child {margin-top: auto} to force the price section, for example, to balance out the layout when all cards are the same height. Great video.
@jadinethomas8935 Жыл бұрын
Thank you!!! No more hecking around with Matching heights with JS.
@tomapedersen Жыл бұрын
Around two years ago I was implementing almost the exact same design (image of various height on top, two text boxes with unknown number of lines). Firefox had subgrid then, and I was looking at it while implementing some ugly Javascript and cursing. Very pleased that subgrid is in all browsers now.
@anarchodin Жыл бұрын
If it's not useful to ad-tech offering, Chrome is slow to adopt. :)
@the3rdchief Жыл бұрын
If you watched this video, not knowing what to expect... gather here, please😅
@CynthiaNic_era Жыл бұрын
Same here... I searched "learn Css with Kevin Powell" and I got this.. haha let me learn and see what it's got😎
@shineLouisShine Жыл бұрын
To be honest, it rarely happens, that I'm clicking a 'Clickbait title' (such as "Game Changer" in this case), and think that the bait was justified. This one is different in that regard. So... Yeah... I didn't know what to expect but I'm very pleased being tempted to land here because the content is truly informative.
@bopuc Жыл бұрын
1. Amazing. As someone who had to hack hundreds of layouts in tables back in the days, this is truly tears-of-joy inducing. 2. Do you have Chromium, WebKit and Gecko running in your brain?! The speed at which you do this is like you are rendering everything in your mind's eye before you type it in haha. (Of course I don't imagine you just start the camera and record but really prep these so you're ready, but still…) ;)
@altaccount648 Жыл бұрын
I wish CSS had better nesting like SASS, honestly the only reason I don't want to use plain CSS is the below-average nesting.
@AndyFairlieАй бұрын
You can best CSS selectors now in modern browsers, try it!
@zsoltoroszlany Жыл бұрын
I'm so angry to myself because everything is easy, I understand. But when I need to work with grid, subgrid etc. everything, my knowledge just vanishes. It is frustrating but maybe if I'm going to spend more time with it, it will stick. Thank you @KevinPowell for the greate tutorial.
@Hobbitstomper Жыл бұрын
Chrome: Hold my beer. Firefox: Wait, where's my beer?
@jfftck Жыл бұрын
I am so happy for the focus on layouts in CSS instead of the visual aspect - animations, shadows, masking, etc… This was one of the arguments for CSS when it was first introduced, but then I started to feel that the CSS working group was losing focus. Now that layout is more of the focus, I am getting excited about CSS again.
@wojciechbajon Жыл бұрын
finally I'm understand subgrid
@adeisaac Жыл бұрын
I officially crown thee, "King of CSS" 👑👑👑👑👑
@ainschy Жыл бұрын
Thx, looks great for the future of css design
@bentoth4324 Жыл бұрын
If you are using webpack (or worse, Safari) you can use: grid-template-columns: repeat(auto-fit, minmax(calc(min(100%, 180px)), 1fr));
@orbitory7936 Жыл бұрын
Can you talk more about container queries, support for them and how can we add support for browsers that don't have it?
@ScottMackey Жыл бұрын
Another great video Kevin! Wonder what has changed so that CSS is making so many great changes/enhancements at a fast pace? Given that for over a decade we was stuck with floats for positioning. 🤣 Thanks again.
@erickmoya1401 Жыл бұрын
IE was deprecated.
@ScottMackey Жыл бұрын
@@erickmoya1401 yeah kinda weird that we have some form of standards now too.
@aram5642 Жыл бұрын
Form layouts will also get simpler, esp. those split into columns with labels on the left
@pharmokan Жыл бұрын
great vid. but I hate how the cards cut off the image, is there any workaround for that?
@shineLouisShine Жыл бұрын
Great stuff. Thank you
@nikilragav Жыл бұрын
7:05 so that first row of cards where the text is wrapping onto a second line is actually taller than the second row where the text isn't wrapping, right? What if I want every card to be the same size (big enough so that none of the text overflows
@djmtype Жыл бұрын
Would it be better to use 1/-1 on product row instead of span 3? For example, if you were to introduce another element on the product card, the grid would break because it would need to span 4 rows.
@parahumanoid11 ай бұрын
Dear Kevin and fellow subscribers, if I recall correctly, it was once mentioned in the channel, that DIV is inline according to spec, but block by default browser styles - unanimously. If so, would you please be so kind as to hint where I can confirm the specification default display type for DIV? Thank you.
@jacobharvey2946 Жыл бұрын
I haven’t tried it in a decade… I wonder how all this modern grid stuff would play out with my flexible SVG project I had back in the day. Effectively it was what you see a lot of sites do with their logo (shrinking it when the page scrolls) on steroids. I based the testing on a another, popular experiment at the time that basically used a sprite sheet. I used the object element and CSS connected to the SVG to resize and manipulate logo(s). The object tag allowed for a sort of sub-page effect. End result was whatever the dimensions of the wrapping element affected the SVG.
@jacobharvey2946 Жыл бұрын
More unrelated, but the first thing I actually thought of when this popped up. I wish I could convince my only freelance client to be more “flexible” with one of the pages on their site. It’s basically a press page where two page spreads, magazine covers, and web articles all live together. Naturally it’s a grid of items. But with all the variations on image sizes, sometimes it being 2 side by side images, and the client’s requirement none of them can be cropped, it’s a pain to deal with. And of course, new, varying sized items, reflow the page and I periodically get asked if there is another way to do it. Every solution I’ve come up with is slapped down. Long story short, they want a flexible layout for the modern web, while somehow also having pixel perfect precision, using varying sized elements. 🤦♂️
@paulab9310 Жыл бұрын
Kevin I really liked this tutorial and it made me go for subgrid to align the lines of a list of articles. The only issue I have is what happens when you want this card elements or products in your case to be wrappend in an a tag. I want people to be able to click on a the card and be redirected to the actual article. I've sent the a tag for now for the title and the paragraph but it makes my HTML not very DRY. Any suggestions?
@danielgago-sk Жыл бұрын
js can control clicks on any element or entire block
@clevermissfox Жыл бұрын
How did I not clock that container queried can be nested within a certain selector. I had also just been wondering if a grid items container would be the main wrapper OR it’s specific cell (since width: 100%; ends up being in relation to the cell not the main wrapper) good to have clarification thank you!
@eccenux Жыл бұрын
This is a bit of a nit picking comment, but something others may learn from. To get a better structure and wcag/a11y: the product divs should probably be sections with a header on top of the section or with `aria-labeledby`. I know that Kevin probably knows that as he shown good knowledge of a11y in the past 🙂 and in this case it would probably complicate the example. But something worth knowing that the grid in that structure and layout would be a bit "awkward" for screen readers 😉
@shankar99977 Жыл бұрын
@KevinPowell this is amazing... why you don't make videos on "float"? Could you please make video on floats? I watched your old one too...
@cykonetic Жыл бұрын
Nested tables led to a revolution in CSS which now introduces "subgrid"... looks a lot like nested tables to me ...
@Asyncsprice Жыл бұрын
I loved your part in the scrima front end dev career path!! Do you have any plans to put another little course on there? maybe involve CSS variables or some of this sub-grid stuff!! would be awesome. Any way happy developing!
@KevinPowell Жыл бұрын
Really glad that you liked it! Right now I don't have plans for new material there though. It's not a *never* type thing, but nothing planned
@onitech3811 ай бұрын
Hello @kevinPowell. I'm learning html and css in my own, and I'm having a lot of troubles when personalizing the page...on the styling part😅...can you help me
@qassimahmed1791 Жыл бұрын
Hello i have a question, why does the body or a main or some kind of container gets a height of 0, even though there are contents inside, but they appear outside in the inspection Or even sometimes the body does not take the full width of its content, in other words the whole page or so, What i want is a way to make sure all my content stays inside their respective containers, and inside the body
@djkomp3tenz9 ай бұрын
When I don't need the Aside Element and I want it to be Responsive and in the Center with in 480px what should I do?
@scottfwalter Жыл бұрын
Safari seems to have an issue with: grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr)); Any thoughts?
@rahul9704 Жыл бұрын
Subgrid was one my most wished for feature since grid landed
@girabbit Жыл бұрын
So the subgrid means that an element that spans multiple columns or rows has its children obey the parent grid. Is that right?
@heavylog1c Жыл бұрын
Grids are overcomplicated. Still using flex. Container thingy is pretty cool though.
@LaughingInCorner Жыл бұрын
This is great
@spatialoptic Жыл бұрын
Thank you so much
@sawilliams Жыл бұрын
Kevin, How do you know all this stuff!!!!?
@AdrianCBlack Жыл бұрын
is there a pen with this exmple on codepen?
@AdrianCBlack Жыл бұрын
found it 😀
@brandonwebb474 Жыл бұрын
Hi Kevin!
@KevinPowell Жыл бұрын
👋
@webdeveloper4742 Жыл бұрын
Kevin keep your volume levels the same in each upload as Google doesn't like variable levels.
@teacherrameshkumar Жыл бұрын
At this point of time, could one just rely solely on grid/sub-grid alone and forget about float, flexbox etc?
@timgreller Жыл бұрын
there is nesting in default CSS now??? How did I miss that lol I already knew and used sub-grid, I know about the container queries for some time now. But I was so expecting the code not to work when you started nesting the CSS selectors in a normal CSS file. I was wondering how long it will take you to realize that you are in a CSS not SCSS file. But then it just worked 😂
@olesejus Жыл бұрын
Nice demo. However this type of problem its still easy to solve with other solutions. But subgrid will be super useful with tables. Where column width should be dynamic depends on text length. Now to do that is only possible with where table have its own styling problems. Flex would give you different cell length per different row. And with bigger projects there is always many tables. Most common solutions to that is to use event does not look good. Use JS to dynamically count cell width, but becomes slow. Would be interesting if you try to play and maybe demo solutions in some other demo ;)
@KevinPowell Жыл бұрын
How would you solve this problem without subgrid? For the image height, it would work, but not for the lines of text that are either 1 or 2 lines that I had on my titles :) - I'm not sure why we'd need subgrid in a table though, and not just a regular grid? 🤔 - And if we do change the display property of a table we have to be careful because it strips all the semantics of the table away the instant we do that, so we need to add everything back using aria roles (which we can do with JS, manually would be a nightmare).
@olesejus Жыл бұрын
@@KevinPowell price field in this demo is fixed height. so any flex or grid option with flex: 1 or fr1 for middle header field works fine. I understand the idea you wanted to explain. But that would be more noticeable for traditional horizontal table where you need to sync column width.
@calyodelphi124 Жыл бұрын
This will depend on the contexts in which you use when you don't want to use it, because if you need to arrange tabular data, it is always an accessibility best practice to use the tag so that screen readers for the sight-impaired will function properly when reading the contents of the page to the user. But if you're arranging content in some kind of griddy way where we might previously have used or even the 960 grid framework, then the CSS grid module is definitely the way to go.
@zinodavidoff5953 Жыл бұрын
👑
@katlegomonama5824 Жыл бұрын
css king
@hugodemenez Жыл бұрын
Awesome
@CarlosBronze Жыл бұрын
oh wow Subgrid is now Global 79.34% on caniuse. thats in 10 days!
@muhammadusmanakram406 Жыл бұрын
i did not get grid/subgrid at all
@confused_horse Жыл бұрын
What happened at 2:41?
@KevinPowell Жыл бұрын
Just a bit of an awkward cut :)
@confused_horse Жыл бұрын
@@KevinPowell absolutely great video though! In fact, I've just wasted an hour of everyone at work discussing the concepts you've shown.
@rijine Жыл бұрын
Cool..
@JasonJA88 Жыл бұрын
The mobile support is a little better than what is shown on 'Can I use.' On iOS, most browsers are just reskinned Safari, while on Android, Chrome is under the hood.
@KevinPowell Жыл бұрын
On iOS every browser is reskinned Safari, as they all have to use webkit. On Android, however, that isn't the case, the can use their normal engine. A lot of the time for mobile, the most important number to look at is when iOS gained support for it, since it's directly linked to the version of iOS, you can know what devices support it or not.
@snowandcoal26 күн бұрын
Why the fuck shit like this gets me excited
@rand0mtv660 Жыл бұрын
It's unfortunate that subgrid has only started to gain traction recently. If other browsers implemented it in 2019 when Firefox did, world would be a better place now
@KevinPowell Жыл бұрын
100%, but better late than never 😅
@moshpat86 Жыл бұрын
GUNDAM ❤️
@albertjoanagramontesuero5290 Жыл бұрын
Hi
@KevinPowell Жыл бұрын
Hi!
Жыл бұрын
While impressive I find the whole construct very complex to achieve the effect. You have various styling across multiple elements which for me hurts readibility and maintenance. I personally would avoid subgrid due to this tight coupling. I think 7 out of 10 front end developers would probably balk at maintaining this css while full stack developers would probably not touch it.
@KevinPowell Жыл бұрын
Subgrid is definitely a trade off, you get more control. I could have done the same thing though, without the `grid-auto-rows` and instead simply given the images an actual height and we'd have the same result, but I wanted to explore an alternative. They are much simpler to use in columns than rows though, imo.
@grinsk3ks Жыл бұрын
good as an example, but I wouldn't do that in real world. It's against component based design.
@calyodelphi124 Жыл бұрын
WHAT IS THIS WITCHCRAFT THIS IS SO COOL 8D
@qeqsiquemechanical9041 Жыл бұрын
humanity already has quantum computers with its own cryptography, and webdevs still can't solve div centering and arranging. imagine being so screwed up as a field
@GrimChu69 Жыл бұрын
These hacky solutions is why css is so frustrating...
@Dead_Goat Жыл бұрын
Ehh not really considering you should never use grid, or grids period. We stopped using tables a LONG time ago please do not go back.