Responsive Typography with CSS Clamp

Поділитися
Вставка
  • Опубліковано 28 жов 2024

КОМЕНТАРІ • 39

  • @dzsuvi
    @dzsuvi Місяць тому +3

    Never used clamp before because I didn't understand how it work. I do now. You've got a new sub! Thanks

  • @CrispyCircuits
    @CrispyCircuits Місяць тому

    I had no idea how to set the middle value despite seeing it used in many videos. All clear now. Liked and subscribed now. Don't let me down, keep me properly sized. 😜

  • @ClarkeDesign
    @ClarkeDesign 2 місяці тому +4

    Should you not be using rem or em instead of px for the max and min sizes?

  • @elAmigo805
    @elAmigo805 Місяць тому +1

    Awsome, this solves an issue I was having. Thanks

  • @thexpand
    @thexpand Рік тому +16

    Great video. I have a few suggestions, though - it would be better to use 1rem + 8vw for the second argument of the clamp function to be able to scale the text depending on browser zoom or user preferences for font size. Also, the same goes for using rems instead of pixels (in your case 50px and 100px would probably be best replaced with non-fixed values).

  • @chrisicotec7652
    @chrisicotec7652 5 місяців тому +2

    i was always confsed as to how clamp worked, but i found this channel, now it all makes sense .... you got a new sub

  • @koresaliva
    @koresaliva 3 місяці тому +1

    Extremely helpful thank you!

  • @mikhaillav
    @mikhaillav 3 місяці тому +1

    Thank you so much! Really helpful ✌️

  • @scottonanski4173
    @scottonanski4173 6 місяців тому +14

    Okay, great! Now use this in a real-world development example where you have 3 monitor sizes; 1920 x 1080, 3840 x 1600, and 5120 x 2800. Use this on containers, headers, footers, etc. It's not as easy are you making it out to be.

    • @codobyte
      @codobyte Місяць тому +1

      And I would like to add pixel-ratio for retina screens!
      If someone can give me a solution how to do that?

    • @iJuce
      @iJuce 25 днів тому +1

      Note how he didn’t even respond😂 he can’t be bothered

    • @firstlast493
      @firstlast493 10 днів тому

      Should I use userAgent and dppx?

  • @johan.svensson
    @johan.svensson 3 місяці тому +1

    Great tutorial. Thank you.

  • @dileepbatchala1590
    @dileepbatchala1590 Рік тому +2

    If it is single line clamp function is ok, but when the text is in multiple lines what about the line height? It should also change accordingly.

  • @victoradeniji4554
    @victoradeniji4554 9 місяців тому +1

    Awesome video. Thank you so much.

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

    Best video so far

  • @ChiragEmpyreal
    @ChiragEmpyreal 7 місяців тому +1

    thanks for this.

  • @ooomb6439
    @ooomb6439 2 місяці тому +1

    thankyouu bro you got a sub

  • @rg-web-design
    @rg-web-design 6 місяців тому

    I wonder if there is a way to create a 'reverse clamp' for vw? On a desktop, I might want the website logo to be 10vw but on mobile I'd want it 20vw. I haven't found any solution as yet.

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

    Interesting new thing, thank you 🤙

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

    it is a very good video one of my favorites

  • @OCEMTechZone
    @OCEMTechZone 8 місяців тому +1

    Great 🎉

  • @magatsu82
    @magatsu82 Місяць тому

    Try to zoom in or out now.... font will remain the same size, don't use vw alone and px are not a good way to set font sizes, use rem or em

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

    Brother what about the line height?

  • @juanortegaa6916
    @juanortegaa6916 Рік тому +2

    Did you take this from Kevin Powell ??

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

    Font clamp not working for samsung galaxy mobiles

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

    which using vs cde theme?

  • @darkman237
    @darkman237 8 місяців тому

    stupid question: this will work for any font?

    • @oliseoseji8868
      @oliseoseji8868 7 місяців тому

      yes and not just font

    • @darkman237
      @darkman237 7 місяців тому +1

      @@oliseoseji8868I wasn't able to get it to work on firefox, latest version.

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

    Can I use clamp and media query at the same time?

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

    Font clamp size not working different devices pls tell the solution sir .....

  • @Atractiondj
    @Atractiondj 25 днів тому

    not a single UA-camr shows how such typography works for text at least in 2 lines, everyone takes 2-3 words and says wow look one line...
    In real examples you will have to add another media query to edit the font sizes otherwise they may be smaller than they could be...
    The video is just clickbait! There is no solution for fonts in one line!

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

    Wasting too much of time in video instead ( Get inspired from @Fireship )