Why Clamp() improves Responsiveness for your Wordpress Website - Font -Images - Margins and Paddings

Поділитися
Вставка
  • Опубліковано 1 січ 2025

КОМЕНТАРІ • 48

  • @nayanponz7883
    @nayanponz7883 Рік тому +3

    Clamp is the best thing I learn this month, it helps you to skip and save many hours optimizing tablet and mobile responsive, thank you very much for all the tutorials.

  • @faldskrmsudspring7052
    @faldskrmsudspring7052 5 місяців тому +1

    you really make some super good videos. easy to understand and good humor. Thx 😊

  • @davidwalls2304
    @davidwalls2304 Рік тому

    Thanks Imran for this video on the clamp() function. This definitely gives a much smoother appearance to change in font/padding sizes as the viewport changes.

  • @elevateyourcreativeness
    @elevateyourcreativeness Рік тому +1

    An awesome video Imran!
    I have been avoiding using the Clamp() function as I could not ever get it right!
    This video explained a lot and I believe I can now properly execute it across all my clients site’s! Thank you!

    • @harbourdogNL
      @harbourdogNL Рік тому

      Agreed. I'd rather go through the extra labour of changing stuff up for tablet and then again for mobile. Mind you, I'm not doing this for a living either, if I was I might pay more attention to it.

  • @ozartdesign
    @ozartdesign Рік тому

    You are a dam genius!!!, Thanks this calculator is such a brilliant idea & saves so much dev time. Absolute GOLD :)

  • @rg-web-design
    @rg-web-design Рік тому

    Awesome work mate!

  • @turningpointgifts
    @turningpointgifts Рік тому

    Thanks for the amazing content. Why don't we just set the size of text and other elements using vw (viewport width) and let it be responsive and scale that way as opposed to using clamp? What am I not seeing?

    • @websquadron
      @websquadron  Рік тому

      I find it works better with scaling but I could be wrong

    • @turningpointgifts
      @turningpointgifts Рік тому

      @@websquadron I think I'll set the size of the text using vw whenever I want it to scale exactly proportional to the screen width, but I'll use clamp anytime I want it to scale dis-proportionally to the screen width, if that makes sense. I'm a beginner so let me know if you think that's wrong. I absolutely love your videos and would be lost without you.

  • @EPHONIC
    @EPHONIC Рік тому

    How do you go from say 18px size at narrower width to maybe 16px on desktop? Trying to have larger text on smaller displays. Great video by the way! Love the step by step and explanations.

    • @websquadron
      @websquadron  Рік тому

      Do you mean for fonts?
      In that case you need to use CSS to change the Font Family, and then clamp for the size shift from 18 to 16.

  • @dirtdogdigital3979
    @dirtdogdigital3979 Рік тому

    Hi Imran. Gotta admit, this Clamp thing is clamping my poor brain, lol. Question: on your calculator, if I want to make the body font for desktop and tablet be 20pixels but have it be 18px on mobile, then what do I put in for the body minimum font on your sheet? Thanks in advance.

    • @websquadron
      @websquadron  Рік тому

      You have to enter your min and max width size as well to get the right formula

  • @andrewdjones27
    @andrewdjones27 Рік тому

    Does it work for widescreen?

    • @websquadron
      @websquadron  Рік тому

      Yup that’s why I use it

    • @andrewdjones27
      @andrewdjones27 Рік тому

      What's the best way to do it so it looks good on widescreen too? max width of 2400px and clamp?@@websquadron

  • @GARdotETH
    @GARdotETH 11 місяців тому

    Does this still work in Elementor? I'm on the latest Pro version and pasting in any clap codes does not work?

    • @websquadron
      @websquadron  11 місяців тому

      Can you share an example code that you’re adding? Have you ensured that there is no value for the tablet and mobile?

    • @GARdotETH
      @GARdotETH 11 місяців тому

      @@websquadron Sorry I was having a blonde moment 👀I was pasting it into the pixel value instead of the custom field. Thanks for the video and help.

  • @pepincuatro2865
    @pepincuatro2865 Рік тому

    Why doesn't the Wordpress editor recognize the clamp function? I've tried this on the Aditional CSS for the theme but it doesn't acknowledge it (it doesn't appear in the pop-up list and the word clamp is left on black, thus it doesn't have any effect).
    Am I doing something wrong or is it just that the Wordpress editor doesn't work for that?

    • @websquadron
      @websquadron  Рік тому

      What are you pasting?
      Add here.

    • @pepincuatro2865
      @pepincuatro2865 Рік тому

      @@websquadron For example:
      h2{
      font-size: clamp(2rem, 10vw+1rem, 9rem) !important;
      }
      I've tried several ways, but it seems to me that this code is too complicated for the Theme Customization Aditional CSS.
      Maybe it works for Elementor but I already created my website with the default Wordpress editor.
      I'm using the theme GeneratePress, not sure if that matters.

  • @HoMer-iw8cw
    @HoMer-iw8cw Рік тому

    Nice
    what is the difference between the tabs /sheets Clamp() vs Clamp() Repeat Size

    • @websquadron
      @websquadron  Рік тому

      You should not have to enter your sizes once and it copies down across them all rather than setting one by one

    • @HoMer-iw8cw
      @HoMer-iw8cw Рік тому

      @@websquadron but there are 2 sheets thats what I meant
      2 sheets with different names

    • @websquadron
      @websquadron  Рік тому +1

      @@HoMer-iw8cw Yes. Sheet 1 allows you to add individual Widths, whereas the repeat only requires you to enter the min and max width once and then it repeats - you can see the shaded cells.

  • @mindtrix7617
    @mindtrix7617 Рік тому

    I went to your link for the clamp, but it says that the connection is reset when loading the widget on your page

    • @websquadron
      @websquadron  Рік тому

      Thanks for letting me know. I just double checked and it's all fine. Here: websquadron.co.uk/font-clamp-generator/

  • @MatichekYoutube
    @MatichekYoutube Рік тому

    would be better to put a class in the container and then set all headings in main css?

    • @websquadron
      @websquadron  Рік тому +1

      That's another way too :)
      But you may end up having many alternate classes to maintain.

    • @MatichekYoutube
      @MatichekYoutube Рік тому

      @@websquadron you write it once right and then put the class in the needed container?

  • @danicahmanisha7663
    @danicahmanisha7663 Рік тому

    One guys help me out.... I've been also working on my responsiveness of my website, and I struggle with the scaleability of my website. What I want is the format that I have on my laptop version to scale it up to a 5K (Amac) format. But I can't figure out......

    • @websquadron
      @websquadron  Рік тому +1

      Are you using Boxed width or Full width and are you setting the max and min sizes? We could do a 1-2-1 Consultation.

    • @danicahmanisha7663
      @danicahmanisha7663 Рік тому

      @@websquadron I've been using a full width

    • @websquadron
      @websquadron  Рік тому

      @@danicahmanisha7663 That's okay. Next comes deciding on the margins/paddings and font sizes. You have to accept that sometimes big screens will never look good and they max out at 1400 width inside.

  • @israelayele69
    @israelayele69 Рік тому

    It doesnt work for me and have everything set properly. Although i do have 4 break points, its not still working well. When on mobile, it scales down but thee fonts and size isn't precise, its just weird.

    • @websquadron
      @websquadron  Рік тому +1

      Did you just add it to desktop and make sure the others are blank?

    • @israelayele69
      @israelayele69 Рік тому

      @@websquadron i did, this is my second time trying this and I am receiving this error

    • @israelayele69
      @israelayele69 Рік тому

      I just noticed it works in the Normal title setting and not the Global setting

  • @borisnieminen677
    @borisnieminen677 Рік тому

    Excellent

  • @adamjenei1411
    @adamjenei1411 10 місяців тому +1

    This is 🤤🤤🤤🤤

  • @MrGoalie2012
    @MrGoalie2012 6 місяців тому

    you shouldn't have to use a clamp calculator.....it should scale and be responsive natively. it's insane that ta web builder isn't optimized like that already.

    • @websquadron
      @websquadron  6 місяців тому +1

      I agree. I do think that Page Builders and Themes and even WordPress by default should have all of this.

  • @abdullahiowolabi5317
    @abdullahiowolabi5317 Рік тому

    What if the website is handed off to a designer that has never heard of clamp before, wont he freak out😂

    • @websquadron
      @websquadron  Рік тому

      Yup hence why I would think about the pros and cons of using it