CSS Subgrid Layouts Are Here!

  Рет қаралды 5,121

Dmitry Mayorov

Dmitry Mayorov

Күн бұрын

In this video, we'll explore together how to use CSS Subgrid for a popular layout: a newsletter sign-up form where everything aligns side by side, and the submit button lines up perfectly with the input fields. This setup can get a bit tricky, especially with the addition of labels and changing help text for the input fields.
Previously, achieving such layouts often required JavaScript. But now, thanks to the wider support for "subgrid," it's become much simpler to accomplish without any JavaScript. Join me in this video to discover how to leverage this fantastic CSS Grid feature for your projects.
CodePen: codepen.io/dmtrmrv/pen/ZEPNxjV
Chapters
00:00 - Intro
00:32 - Keeping Form Control and Newsletter Form Separate
01:20 - Building the Layout
03:04 - Using 'auto' for Grid Widths Where Appropriate
03:53 - Encountering Issues
04:10 - Enter Subgrid
06:06 - Making Final Adjustments
07:26 - Keeping Form Control intact
08:07 - Et Voilà!
08:10 - Demonstrating Robustness
09:00 - Conclusion

Пікірлер: 18
@KOBE42__
@KOBE42__ 25 күн бұрын
Just want to make another comment to say I feel I’m learning a lot already after watching just a couple of your videos! Your approach to web development is excellent, demonstrating scalability and maintainability which just shows your level of expertise - I look forward to learning more from you and watching this channel grow 👌
@dmtrmrv
@dmtrmrv 25 күн бұрын
Thank you for the kind words! Means a lot!
@konana7840
@konana7840 Ай бұрын
Very useful example! I love the way you explain all of this in a simple way, keep it up!
@dmtrmrv
@dmtrmrv Ай бұрын
Thank you, this means a lot! Glad you liked the video.
@SrinivasBuddha69
@SrinivasBuddha69 2 ай бұрын
Thanks for the clear explanation of CSS Subgrids. Helpful.
@dmtrmrv
@dmtrmrv 2 ай бұрын
Thank you for your comment; you're very welcome! I'm glad you found it helpful!
@Allformyequine
@Allformyequine Ай бұрын
This is a great example of using Subgrid and probably the one I've been waiting for! I have found subgrid hard to wrap my head around so this is appreciated!
@dmtrmrv
@dmtrmrv Ай бұрын
@Allformyequine Thank you! Glad you found the video helpful. You can't imagine how many times I left a comment like this in my projects: /* To do: refactor when subgrid is available. */ So happy it's finally well-supported.
@AnthonyNevo
@AnthonyNevo Ай бұрын
Great video! There is a clear explanation, and the quality is perfect.
@dmtrmrv
@dmtrmrv Ай бұрын
Thank you, Anthony!
@_kovshenin
@_kovshenin 2 ай бұрын
CSS has come a long way.
@dmtrmrv
@dmtrmrv 2 ай бұрын
It has! I remember writing JS to build layouts like this. Still waiting on masonry though.
@pegak
@pegak 28 күн бұрын
Would love to see this solved in Tailwind. 😊
@dmtrmrv
@dmtrmrv 28 күн бұрын
Thank you! Currently, there are no plans for utility-first content, but who knows? Maybe in the future.
@talatkuyuk6556
@talatkuyuk6556 Ай бұрын
Thank you, I appreciate your explanation.
@dmtrmrv
@dmtrmrv Ай бұрын
You are welcome! This was more me being excited about the fact that Subgrid now has a wide support. I think I'll do another general video on the use of subgrids.
@Nusamaxa
@Nusamaxa Ай бұрын
Great Video! Do you think mobile first is still important? Internet is so fast, the difference is not much in real life noh?
@dmtrmrv
@dmtrmrv Ай бұрын
@Nusamaxa I believe it is the majority of times, but the real answer, like many things in web development, is "It depends." I think I'll make the next video about it, it's a great and important topic. Stay tuned.
Keep Footer at the Bottom of the Page: HTML & CSS (2024)
3:42
Dmitry Mayorov
Рет қаралды 2,5 М.
Easy and more consistent layouts using subgrid
8:01
Kevin Powell
Рет қаралды 40 М.
Спаси её волосы🙏🏻
00:40
БРУНО
Рет қаралды 1,5 МЛН
Não pode Comprar Tudo 5
00:29
DUDU e CAROL
Рет қаралды 65 МЛН
Genial gadget para almacenar y lavar lentes de Let's GLOW
00:26
Let's GLOW! Spanish
Рет қаралды 36 МЛН
CSS Anchor Is The Best New CSS Feature Since Flexbox
15:39
Web Dev Simplified
Рет қаралды 349 М.
Learn CSS BEM (and avoid these common mistakes)
15:36
Dmitry Mayorov
Рет қаралды 3,6 М.
I Miss Square Checkboxes
7:58
Theo - t3․gg
Рет қаралды 150 М.
TailwindCSS Animated Border Gradient (MIND BLOWING!)
9:48
Ariel Weinberger
Рет қаралды 3,2 М.
You can't do this without subgrid
10:49
Kevin Powell
Рет қаралды 15 М.
How to take control of Flexbox
16:01
Kevin Powell
Рет қаралды 65 М.
A new approach to container and wrapper classes
25:27
Kevin Powell
Рет қаралды 233 М.
Finally Fix Your Issues With JS/React Memory Management 😤
20:13
Jack Herrington
Рет қаралды 73 М.
Incredible scroll-based animations with CSS-only
32:23
Kevin Powell
Рет қаралды 295 М.
Subgrid & Container Queries change how we can create layouts
21:08
Kevin Powell
Рет қаралды 69 М.
Спаси её волосы🙏🏻
00:40
БРУНО
Рет қаралды 1,5 МЛН