Make Sense of Box-Sizing in CSS (and avoid this major mistake!)

  Рет қаралды 965

Dmitry Mayorov

Dmitry Mayorov

Күн бұрын

Пікірлер: 19
@youferret
@youferret 7 ай бұрын
Great lesson Dmitry. I wonder how many coders were wishing they had seen this earlier.
@dmtrmrv
@dmtrmrv 7 ай бұрын
Yeah, true. I definitely made this for my younger, junior self.
@pappapez
@pappapez 7 ай бұрын
Thanks! This is insanely important stuff. And you explain it so well. You almost make css make sense!
@dmtrmrv
@dmtrmrv 7 ай бұрын
Thank you : ) I swear it does! Well, most of the times.
@romanperera
@romanperera 7 ай бұрын
that "OMG" reaction to the text-input's width was absolutely epic! 😎✌
@dmtrmrv
@dmtrmrv 7 ай бұрын
Well, that was genuinely how I felt when I first started learning CSS, lol!
@romanperera
@romanperera 7 ай бұрын
@@dmtrmrv so true, i still get surprised with how some styles work, even after im 100% sure its correct 😅 then, i find my own idiotic mistake 😁
@ZakBazzinga
@ZakBazzinga 3 ай бұрын
so helpful thx king 👑
@dmtrmrv
@dmtrmrv 3 ай бұрын
Glad the video was helpful!
@MissEAG
@MissEAG 7 ай бұрын
Hi, I have been really enjoying your teaching style and look forward to your new videos. I have recently been learning about partials folders in Sass and learned about creating variables in a colors folder for example. I realize that isn't what you've done here as you've listed colours at the top under the :root tag?... not sure.. maybe in a future video could you talk about when to use this list of colours that you have listed in double hyphens vs using partials folders and using $black = #000000, with the dollar symbol, for example. Maybe I'm missing something fundamental, not sure, I will also look it up. Thanks!
@dmtrmrv
@dmtrmrv 7 ай бұрын
Hi @MissEAG! Thanks for your kind words and for watching the videos! You're right; I don't use separate files to store variables in my demos and stick to vanilla CSS rather than Sass. My main goal is to focus on a specific topic or pattern that can be applied across various contexts-CSS, Sass, CSS-in-JS, and so on-rather than on the tooling itself. In real-life projects, it often depends on the project, but I would likely put variables into a separate file, which is generally considered a best practice. Regarding Sass, I stopped using it a few years ago as CSS began to rapidly evolve. We now have features like variables, nesting, and other enhancements, so I personally don't see the need for Sass since it adds another tool and dependency. I prefer to keep my projects as dependency-free as possible (but with as many as necessary). However, I understand some engineers still use Sass, and if it works well for the project and the team, that's perfectly fine. Perhaps a CSS vs. Sass video is something to consider for the future.
@Tesfamichael.G
@Tesfamichael.G 7 ай бұрын
Nice lesson!
@dmtrmrv
@dmtrmrv 7 ай бұрын
Glad you enjoyed it!
@onelook1870
@onelook1870 7 ай бұрын
How to make font-family inherit for form elements if it is set in body?
@dmtrmrv
@dmtrmrv 7 ай бұрын
Hey @onelook1870, thanks for your comment! I'm not sure I fully understand the question. The video doesn't cover that, but I'll happily look at your code if you happen to have it on CodePen or Github.
@onelook1870
@onelook1870 7 ай бұрын
Form input field doesn't inherit font family set to body. We have to set again. body { font-family: "Poppins", sans-serif; } We have to set it again for form fields.
@cuemaster-
@cuemaster- 7 ай бұрын
@@onelook1870 That seems to be right, but let's wait for Dmitry confirmation. Thanks for the input (no pun intended). 🙂
@douvogiannisgeorge
@douvogiannisgeorge 7 ай бұрын
as always explain for humans ;) cant wait for more!
@dmtrmrv
@dmtrmrv 7 ай бұрын
Thank you! Glad to hear the explanation was easy to understand!
Master CSS Units: Pixels, REMs, & EMs
15:41
Dmitry Mayorov
Рет қаралды 1,2 М.
Master CSS Spacing: Margin, Padding, and Gap Explained
17:18
Dmitry Mayorov
Рет қаралды 1 М.
Support each other🤝
00:31
ISSEI / いっせい
Рет қаралды 49 МЛН
UFC 310 : Рахмонов VS Мачадо Гэрри
05:00
Setanta Sports UFC
Рет қаралды 1,2 МЛН
Learn CSS BEM (and avoid these common mistakes)
15:36
Dmitry Mayorov
Рет қаралды 8 М.
This One Thing Causes Most CSS Issues! (learn how to avoid it)
9:05
Dmitry Mayorov
Рет қаралды 2,3 М.
Explained in 4 minutes: Semantic HTML
4:05
onjsdev
Рет қаралды 505
How you can simplify your CSS with :is()
9:20
Kevin Powell
Рет қаралды 336 М.
box-sizing: border-box explained
5:22
Kevin Powell
Рет қаралды 233 М.
CSS Tip: Extend a Child Beyond Parent Width (the better way)
12:29
Dmitry Mayorov
Рет қаралды 1,1 М.
Why I'm Not in My Studio? (A Channel Update)
7:19
Dmitry Mayorov
Рет қаралды 337
CSS Vertical Spacing: Margins vs. Gaps Explained
8:01
Dmitry Mayorov
Рет қаралды 1,6 М.
Refactoring Old CSS with AI!
10:28
Dmitry Mayorov
Рет қаралды 1,3 М.
Support each other🤝
00:31
ISSEI / いっせい
Рет қаралды 49 МЛН