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

แชร์
ฝัง
  • เผยแพร่เมื่อ 29 ม.ค. 2025

ความคิดเห็น • 19

  • @youferret
    @youferret 8 หลายเดือนก่อน

    Great lesson Dmitry. I wonder how many coders were wishing they had seen this earlier.

    • @dmtrmrv
      @dmtrmrv  8 หลายเดือนก่อน

      Yeah, true. I definitely made this for my younger, junior self.

  • @pappapez
    @pappapez 9 หลายเดือนก่อน

    Thanks! This is insanely important stuff. And you explain it so well. You almost make css make sense!

    • @dmtrmrv
      @dmtrmrv  9 หลายเดือนก่อน

      Thank you : ) I swear it does! Well, most of the times.

  • @romanperera
    @romanperera 9 หลายเดือนก่อน

    that "OMG" reaction to the text-input's width was absolutely epic! 😎✌

    • @dmtrmrv
      @dmtrmrv  9 หลายเดือนก่อน +1

      Well, that was genuinely how I felt when I first started learning CSS, lol!

    • @romanperera
      @romanperera 9 หลายเดือนก่อน

      @@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 😁

  • @MissEAG
    @MissEAG 9 หลายเดือนก่อน

    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  9 หลายเดือนก่อน

      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 9 หลายเดือนก่อน

    Nice lesson!

    • @dmtrmrv
      @dmtrmrv  9 หลายเดือนก่อน

      Glad you enjoyed it!

  • @ZakBazzinga
    @ZakBazzinga 5 หลายเดือนก่อน

    so helpful thx king
    👑

    • @dmtrmrv
      @dmtrmrv  5 หลายเดือนก่อน

      Glad the video was helpful!

  • @onelook1870
    @onelook1870 9 หลายเดือนก่อน +1

    How to make font-family inherit for form elements if it is set in body?

    • @dmtrmrv
      @dmtrmrv  9 หลายเดือนก่อน +1

      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 9 หลายเดือนก่อน +1

      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- 9 หลายเดือนก่อน

      @@onelook1870 That seems to be right, but let's wait for Dmitry confirmation. Thanks for the input (no pun intended). 🙂

  • @douvogiannisgeorge
    @douvogiannisgeorge 9 หลายเดือนก่อน

    as always explain for humans ;)
    cant wait for more!

    • @dmtrmrv
      @dmtrmrv  9 หลายเดือนก่อน +1

      Thank you! Glad to hear the explanation was easy to understand!