CSS Clamp Simplified, with Fluid Responsive Typography Examples

Поделиться
HTML-код
  • Опубликовано: 26 ноя 2024

Комментарии • 55

  • @kanepaamauloa
    @kanepaamauloa 25 дней назад

    Wow. This is the easiest explanation/tutorial I've come across on this subject. Thanks!

  • @DatchGuest
    @DatchGuest 9 месяцев назад +5

    You are good in explaining codes Bruuuh!!!!!!!!

  • @martyjwalker
    @martyjwalker 7 месяцев назад +2

    Bravo. You've explained clamp better than the RUclipsrs with a million followers.

    • @deeecode
      @deeecode  5 месяцев назад

      Glad it was helpful!

  • @per-net9911
    @per-net9911 Месяц назад

    Top explained. Calculating the intermediate value was always the most difficult part for me. I now use an online calculator where I can calculate the perfect value for the size at which the text starts to grow or shrink. I use the ‘Clamp Calculator’ from Marc Bacon. Since then, I can now calculate the mean value exactly and say that the font should start to grow from 600 px, for example, and must stop growing at 1200 px.

  • @mariarodriguezva3606
    @mariarodriguezva3606 2 месяца назад +1

    Wow, thanks for breaking that down, you made it easier to understand, I liked when you typed in the clamp parameter meanings (min, pref , max), it helps visualize and understand what's going on

  • @moeinzidehsaraei8738
    @moeinzidehsaraei8738 2 месяца назад

    You born to be a teacher❤

  • @ademlayes9116
    @ademlayes9116 10 месяцев назад +2

    Very helpful, your explaining is very smooth and easy to understand even for a 5 year old... your channel needs more support and subs❤

    • @deeecode
      @deeecode  10 месяцев назад

      Thank you for the kind feedback! I’m so glad you enjoyed this video

  • @soph5424
    @soph5424 Месяц назад

    This was SUPER helpful, especially how you broke down the formula for calculating the viewport height relative to the rem units in the clamp, I was really struggling with how to set that value. Thank you for the excellent video!

    • @deeecode
      @deeecode  Месяц назад

      I'm so glad to hear that my detail was helpful :)

  • @immortalboy573
    @immortalboy573 Месяц назад

    this video was great, I've seen many videos so far, but this video can help me understand this concept in css, thank you very much!

  • @harrisonjude7523
    @harrisonjude7523 9 месяцев назад +1

    This is so simple and to the point, you are killing it man! Thank you so much!

    • @deeecode
      @deeecode  9 месяцев назад

      You're very very welcome! I'm glad to hear

  • @tedigrizli
    @tedigrizli 4 месяца назад +1

    Actually the best explanation on the web. Thanks! Liked & subscribed

  • @umairali1100
    @umairali1100 2 месяца назад

    I have also seen other videos, but your method is easier to understand. Please share the standard clamp formula for h1, h2, and other tags?

  • @x-limit2023
    @x-limit2023 4 месяца назад

    clear as crystal! so easy to understand! Thanks man!

  • @AjithKumar-mc9fx
    @AjithKumar-mc9fx 6 месяцев назад

    one of the best explanation videos of CSS clamp
    i really live it💗💗💗💗💗💗💗💗

    • @deeecode
      @deeecode  5 месяцев назад

      Happy to hear that!

  • @akinsholaakinniyi2717
    @akinsholaakinniyi2717 10 месяцев назад +2

    Nice one🤝
    I'll try using it in my upcoming projects
    From LinkedIn btw 🌚

    • @deeecode
      @deeecode  10 месяцев назад

      Thanks for visiting :) Glad you enjoyed this video

  • @dreamscaperz
    @dreamscaperz 8 месяцев назад +1

    very well explaind my guy. thanks

  • @ParkerRoth-v2p
    @ParkerRoth-v2p 3 месяца назад

    This was amazing. Thank you so much!

  • @evilservo
    @evilservo 5 месяцев назад

    the best explanation man

  • @paIeville
    @paIeville Месяц назад

    idk why its been so hard for me to wrap my head around this, thank you 😅 also theres a vscode extension that can convert px to em and vice versa

    • @deeecode
      @deeecode  Месяц назад +1

      haha yeah i discovered the extension much later

  • @amuzatkazeem5378
    @amuzatkazeem5378 2 месяца назад

    When converting Figma UI into React, would pref (min, pref , max) be the actual font sizes or width specified??

  • @user-yc6km3iw7c
    @user-yc6km3iw7c 5 месяцев назад

    Deeeecode 🔥

  • @scottonanski4173
    @scottonanski4173 6 месяцев назад

    Nice and simple explanation. Good job, man. Thank you.

    • @deeecode
      @deeecode  5 месяцев назад

      You’re welcome ✨

  • @likandokayombo
    @likandokayombo 11 месяцев назад

    Nice this is huge. I just used a Clamp function in my project 😅

    • @deeecode
      @deeecode  11 месяцев назад

      Nice to hear :)

  • @phillymontana
    @phillymontana 11 месяцев назад

    Yup yup.
    This is the kid.
    Great tutorial.

    • @deeecode
      @deeecode  11 месяцев назад

      You're welcome!

  • @50mm_
    @50mm_ 11 месяцев назад

    Excellent. I wonder when it will be adopted in tailwind…

    • @deeecode
      @deeecode  11 месяцев назад

      I don't know tailwind enough to answer this soorry

  • @video724de
    @video724de 8 месяцев назад

    Hi, what's this "browser" on the left side of the screen (I can't find out)?
    I didn't know about the clamp functionality (newbie), your explanation helps a lot.
    I just try to find my way into Bootstrap Studio.
    Thanks & regards

    • @video724de
      @video724de 7 месяцев назад

      I found the answer myself - it's simple. It's Google's Chrome browser. I had no need to use it before. Other browsers have comparable abilities (Safari, Firefox), but it seems easier (to me) to use Chrome for this task.

    • @deeecode
      @deeecode  7 месяцев назад

      You're welcome! Actually it's Edge I'm using

  • @afbelardi
    @afbelardi 6 месяцев назад

    Really great explanation! Thank you

    • @deeecode
      @deeecode  5 месяцев назад

      I'm glad to hear

  • @SmilingCherryBlossoms-ez8od
    @SmilingCherryBlossoms-ez8od 20 дней назад

    please, are there any potential dangers of using percentage in all your font sizes...if so...pls let me know. I need reply please

  • @rg-web-design
    @rg-web-design 7 месяцев назад

    Great insight, thanks. I have a logo which the client wants to keep consistent to screen sizes, so I've used VW for the logo size. At 1100px viewport, the logo is 8vw, but down at 380px viewport, the logo size is 22vw. Is there a way to 'clamp' or 'calc' this so the vw increases as the viewport decreases? (I'm a total newbie with CSS). Thanks.

    • @deeecode
      @deeecode  7 месяцев назад +1

      If I get your question correctly, I think your solution here might still be clamp
      by doing something like clamp(minsize, 7vw, maxsize), you're able to ensure that the size of the logo never goes below minsize, and never goes above maxsize
      i don't think you can do a "if viewport increases, decrease the element, but if viewport decreases, increase the element" without javascript involved
      does this help?

    • @rg-web-design
      @rg-web-design 7 месяцев назад

      @@deeecode Thank for taking a look. I almost have this but it does jump on tablet sizes. Please give it a go and have a look.
      clamp(12vw, 12vw - 0.8vw, 5vw)

    • @rg-web-design
      @rg-web-design 7 месяцев назад

      @@deeecode The best way I can describe this is a 'reverse clamp';
      Let's say on desktop I have an image which is 10vw. But on mobile, 10vw is too small. So on mobile I need the image to be 20vw.
      An increase from 10vw to 20vw as the screen gets smaller.

  • @추추-g6t
    @추추-g6t 4 месяца назад

    this is what i looking for! thank you for your video! loved it!

  • @samgenerals4320
    @samgenerals4320 7 месяцев назад

    What about columns and rows..?? Can clamp be used for anything else apart from fonts..??

    • @arrezbrayan
      @arrezbrayan 5 месяцев назад

      Yes you can using it for padding height width

  • @AlonsoLayena
    @AlonsoLayena 9 месяцев назад

    I love your channel!!!!

    • @deeecode
      @deeecode  9 месяцев назад

      So glad you do...you're welcome!

  • @mathblend930
    @mathblend930 11 месяцев назад

    Great

    • @deeecode
      @deeecode  11 месяцев назад

      You're welcome!

  • @aphrodite6647
    @aphrodite6647 11 месяцев назад

    Thankss

    • @deeecode
      @deeecode  11 месяцев назад

      You're very welcome!