CSS Clamp Simplified, with Fluid Responsive Typography Examples

  Переглядів 2,641

Deeecode The Web

Deeecode The Web

4 місяці тому

To create Responsive Typography in your websites, you might immediately want to reach for Media Queries. Well, the clamp function in CSS, is a powerful utility that allows you to easily create responsive typography without any media queries.
In this video, I simplify how this function works, and show you some examples.
_____
Subscribe to My Channel: bit.ly/deeecode
_____
🌟 About Me:
Dillion Megida, creator of DEEECODE, is a Software Engineer, Developer Advocate and a Content Creator passionate about simplifying topics around Tech via articles and videos.
_____
⚡️ Connect with me:
- Personal youtube: / dillionmegida
- Personal website: dillionmegida.com/
- Twitter: / iamdillion
- Instagram: / deeecode
- LinkedIn: / dillionmegida
- GitHub: github.com/dillionmegida

КОМЕНТАРІ: 30
@martyjwalker
@martyjwalker Місяць тому
Bravo. You've explained clamp better than the UKpostsrs with a million followers.
@scottonanski4173
@scottonanski4173 4 дні тому
Nice and simple explanation. Good job, man. Thank you.
@DatchGuest
@DatchGuest 3 місяці тому
You are good in explaining codes Bruuuh!!!!!!!!
@ademlayes9116
@ademlayes9116 4 місяці тому
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 4 місяці тому
Thank you for the kind feedback! I’m so glad you enjoyed this video
@harrisonjude7523
@harrisonjude7523 3 місяці тому
This is so simple and to the point, you are killing it man! Thank you so much!
@deeecode
@deeecode 2 місяці тому
You're very very welcome! I'm glad to hear
@josiaharkson2615
@josiaharkson2615 2 місяці тому
very well explaind my guy. thanks
@akinsholaakinniyi2717
@akinsholaakinniyi2717 4 місяці тому
Nice one🤝 I'll try using it in my upcoming projects From LinkedIn btw 🌚
@deeecode
@deeecode 4 місяці тому
Thanks for visiting :) Glad you enjoyed this video
@phillymontana
@phillymontana 4 місяці тому
Yup yup. This is the kid. Great tutorial.
@deeecode
@deeecode 4 місяці тому
You're welcome!
@likandokayombo
@likandokayombo 4 місяці тому
Nice this is huge. I just used a Clamp function in my project 😅
@deeecode
@deeecode 4 місяці тому
Nice to hear :)
@AlonsoLayena
@AlonsoLayena 2 місяці тому
I love your channel!!!!
@deeecode
@deeecode 2 місяці тому
So glad you do...you're welcome!
@samgenerals4320
@samgenerals4320 Місяць тому
What about columns and rows..?? Can clamp be used for anything else apart from fonts..??
@aphrodite6647
@aphrodite6647 4 місяці тому
Thankss
@deeecode
@deeecode 4 місяці тому
You're very welcome!
@rg-web-design
@rg-web-design Місяць тому
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 Місяць тому
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 Місяць тому
@@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 Місяць тому
@@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.
@video724de
@video724de Місяць тому
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 Місяць тому
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 Місяць тому
You're welcome! Actually it's Edge I'm using
@mathblend930
@mathblend930 4 місяці тому
Great
@deeecode
@deeecode 4 місяці тому
You're welcome!
@50mm_
@50mm_ 4 місяці тому
Excellent. I wonder when it will be adopted in tailwind…
@deeecode
@deeecode 4 місяці тому
I don't know tailwind enough to answer this soorry
Why does Negative Z-INDEXES not work the way you expect in CSS?
3:33
min(), max(), and clamp() are CSS magic!
18:12
Kevin Powell
Переглядів 287 тис.
Маленькая и средняя фанта
00:56
Multi DO Smile Russian
Переглядів 2 млн
Она Постояла За Себя! ❤️
00:25
Глеб Рандалайнен
Переглядів 3,2 млн
Using the CSS Numeric Functions - min, max, calc, clamp, and minmax
10:57
Steve Griffith - Prof3ssorSt3v3
Переглядів 14 тис.
Top 10 CSS One Liners That Will Blow Your Mind
13:34
developedbyed
Переглядів 876 тис.
Every CSS Animation property
9:26
chunkydotdev
Переглядів 44 тис.
You might not need useEffect() ...
21:45
Academind
Переглядів 132 тис.
Utopia - an introduction
18:28
Utopia
Переглядів 10 тис.
The problems with viewport units
13:23
Kevin Powell
Переглядів 349 тис.
Easy Responsive Typography (CSS-only)
10:04
Coding in Public
Переглядів 11 тис.
Modern CSS Features You Should Know About
27:48
Joy of Code
Переглядів 9 тис.
Rust's Alien Data Types 👽 Box, Rc, Arc
11:54
Code to the Moon
Переглядів 129 тис.
🤯Самая КРУТАЯ Функция #shorts
0:58
YOLODROID
Переглядів 3,3 млн
Какой телефон лучше всего снимает? 🤯
0:42
Which Phone Unlock Code Will You Choose? 🤔️
0:14
Game9bit
Переглядів 6 млн
Phone charger explosion
0:43
_vector_
Переглядів 49 млн
Вы поможете украсть ваш iPhone
0:56
Romancev768
Переглядів 405 тис.