Responsive Typography with CSS Clamp
HTML-код
- Опубликовано: 28 дек 2022
- Today we're going to learn how we can use the CSS clamp function to create responsive, fluid typography!
📚 Project Links
code: github.com/TomIsLoading/fluid...
🔗 My Links
GitHub: github.com/TomIsLoading
Twitter: / tomisloading
Instagram: / tomisloading
TikTok: / tomisloading
i was always confsed as to how clamp worked, but i found this channel, now it all makes sense .... you got a new sub
Interesting new thing, thank you 🤙
Best video so far
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).
thanks for this.
Awesome video. Thank you so much.
Happy to help! :)
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.
it is a very good video one of my favorites
Thank you!
Great 🎉
Brother what about the line height?
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.
Did you take this from Kevin Powell ??
Font clamp not working for samsung galaxy mobiles
which using vs cde theme?
Andromeda!
Font clamp size not working different devices pls tell the solution sir .....
Can I use clamp and media query at the same time?
Definitely! :)
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.
stupid question: this will work for any font?
yes and not just font
@@oliseoseji8868I wasn't able to get it to work on firefox, latest version.
Wasting too much of time in video instead ( Get inspired from @Fireship )