CSS Clamp Simplified, with Fluid Responsive Typography Examples

  Рет қаралды 7,781

Deeecode The Web

Deeecode The Web

Күн бұрын

Пікірлер: 67
@martyjwalker
@martyjwalker 9 ай бұрын
Bravo. You've explained clamp better than the KZbinrs with a million followers.
@deeecode
@deeecode 6 ай бұрын
Glad it was helpful!
@harrisonjude7523
@harrisonjude7523 10 ай бұрын
This is so simple and to the point, you are killing it man! Thank you so much!
@deeecode
@deeecode 10 ай бұрын
You're very very welcome! I'm glad to hear
@DatchGuest
@DatchGuest 11 ай бұрын
You are good in explaining codes Bruuuh!!!!!!!!
@deeecode
@deeecode 8 күн бұрын
i'm so glad to hear that enjoyed the video
@ademlayes9116
@ademlayes9116 Жыл бұрын
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 Жыл бұрын
Thank you for the kind feedback! I’m so glad you enjoyed this video
@mariarodriguezva3606
@mariarodriguezva3606 3 ай бұрын
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
@deeecode
@deeecode 8 күн бұрын
yeah it took me a lot of time to understand clamp, and i wished that someone really visualized it this way for me...so that's why i did it this way
@kanepaamauloa
@kanepaamauloa 2 ай бұрын
Wow. This is the easiest explanation/tutorial I've come across on this subject. Thanks!
@deeecode
@deeecode 8 күн бұрын
i'm really glad to hear
@x-limit2023
@x-limit2023 5 ай бұрын
clear as crystal! so easy to understand! Thanks man!
@immortalboy573
@immortalboy573 2 ай бұрын
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!
@deeecode
@deeecode 8 күн бұрын
i'm really glad to hear that this was helpful
@soph5424
@soph5424 3 ай бұрын
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 2 ай бұрын
I'm so glad to hear that my detail was helpful :)
@tedigrizli
@tedigrizli 6 ай бұрын
Actually the best explanation on the web. Thanks! Liked & subscribed
@deeecode
@deeecode 8 күн бұрын
i'm so glad to hear. thanks for subscribing
@moeinzidehsaraei8738
@moeinzidehsaraei8738 3 ай бұрын
You born to be a teacher❤
@deeecode
@deeecode 8 күн бұрын
thank you so much for this kind feedback
@AjithKumar-mc9fx
@AjithKumar-mc9fx 7 ай бұрын
one of the best explanation videos of CSS clamp i really live it💗💗💗💗💗💗💗💗
@deeecode
@deeecode 7 ай бұрын
Happy to hear that!
@추추-g6t
@추추-g6t 5 ай бұрын
this is what i looking for! thank you for your video! loved it!
@deeecode
@deeecode 8 күн бұрын
i'm glad to hear
@akinsholaakinniyi2717
@akinsholaakinniyi2717 Жыл бұрын
Nice one🤝 I'll try using it in my upcoming projects From LinkedIn btw 🌚
@deeecode
@deeecode Жыл бұрын
Thanks for visiting :) Glad you enjoyed this video
@dreamscaperz
@dreamscaperz 10 ай бұрын
very well explaind my guy. thanks
@scottonanski4173
@scottonanski4173 7 ай бұрын
Nice and simple explanation. Good job, man. Thank you.
@deeecode
@deeecode 7 ай бұрын
You’re welcome ✨
@evilservo
@evilservo 6 ай бұрын
the best explanation man
@ParkerRoth-v2p
@ParkerRoth-v2p 4 ай бұрын
This was amazing. Thank you so much!
@deeecode
@deeecode 8 күн бұрын
you're very very welcome :)
@per-net9911
@per-net9911 2 ай бұрын
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.
@deeecode
@deeecode 8 күн бұрын
i'm so glad to hear that my approach simplified things for you
@amuzatkazeem5378
@amuzatkazeem5378 3 ай бұрын
When converting Figma UI into React, would pref (min, pref , max) be the actual font sizes or width specified??
@deeecode
@deeecode 8 күн бұрын
pref is usually relative...like percentages or viewports
@rg-web-design
@rg-web-design 9 ай бұрын
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 9 ай бұрын
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 9 ай бұрын
@@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 9 ай бұрын
@@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.
@afbelardi
@afbelardi 7 ай бұрын
Really great explanation! Thank you
@deeecode
@deeecode 7 ай бұрын
I'm glad to hear
@samgenerals4320
@samgenerals4320 8 ай бұрын
What about columns and rows..?? Can clamp be used for anything else apart from fonts..??
@arrezbrayan
@arrezbrayan 6 ай бұрын
Yes you can using it for padding height width
@video724de
@video724de 9 ай бұрын
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 9 ай бұрын
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 9 ай бұрын
You're welcome! Actually it's Edge I'm using
@paIeville
@paIeville 3 ай бұрын
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 2 ай бұрын
haha yeah i discovered the extension much later
@likandokayombo
@likandokayombo Жыл бұрын
Nice this is huge. I just used a Clamp function in my project 😅
@deeecode
@deeecode Жыл бұрын
Nice to hear :)
@user-yc6km3iw7c
@user-yc6km3iw7c 6 ай бұрын
Deeeecode 🔥
@AlonsoLayena
@AlonsoLayena 10 ай бұрын
I love your channel!!!!
@deeecode
@deeecode 10 ай бұрын
So glad you do...you're welcome!
@umairali1100
@umairali1100 4 ай бұрын
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?
@deeecode
@deeecode 8 күн бұрын
i'm glad you found my approach better. i don't really know a standard...it depends on the style guide defined by different companies
@50mm_
@50mm_ Жыл бұрын
Excellent. I wonder when it will be adopted in tailwind…
@deeecode
@deeecode Жыл бұрын
I don't know tailwind enough to answer this soorry
@phillymontana
@phillymontana Жыл бұрын
Yup yup. This is the kid. Great tutorial.
@deeecode
@deeecode Жыл бұрын
You're welcome!
@SmilingCherryBlossoms-ez8od
@SmilingCherryBlossoms-ez8od Ай бұрын
please, are there any potential dangers of using percentage in all your font sizes...if so...pls let me know. I need reply please
@deeecode
@deeecode 8 күн бұрын
hi sorry i'm just replying...there are usually no dangers, as long as it is controlled (boundaries), just as you have with clamp
@Agujonas13
@Agujonas13 Жыл бұрын
Great
@deeecode
@deeecode Жыл бұрын
You're welcome!
@aphrodite6647
@aphrodite6647 Жыл бұрын
Thankss
@deeecode
@deeecode Жыл бұрын
You're very welcome!
Why does Negative Z-INDEXES not work the way you expect in CSS?
3:33
Animate On Scroll With Just 3 LINES Of CSS (No Libraries Needed)
2:51
Mom Hack for Cooking Solo with a Little One! 🍳👶
00:15
5-Minute Crafts HOUSE
Рет қаралды 23 МЛН
It works #beatbox #tiktok
00:34
BeatboxJCOP
Рет қаралды 41 МЛН
Cheerleader Transformation That Left Everyone Speechless! #shorts
00:27
Fabiosa Best Lifehacks
Рет қаралды 16 МЛН
Sliding Window Technique - Algorithmic Mental Models
36:45
Ryan Schachte
Рет қаралды 368 М.
Simple solutions to responsive typography
9:21
Kevin Powell
Рет қаралды 184 М.
Responsive Typography with CSS Clamp
8:37
Tom Is Loading
Рет қаралды 60 М.
Use these instead of vh
6:06
Kevin Powell
Рет қаралды 524 М.
Easy Responsive Padding with clamp - CSS Saturday
3:59
Code Symphony
Рет қаралды 491
Please stop using px for font-size.
15:18
Coder Coder
Рет қаралды 248 М.
Master CSS Overflow/Text Wrapping Like A Senior Developer
20:53
Web Dev Simplified
Рет қаралды 61 М.
A flexbox trick to improve text wrapping
5:02
Kevin Powell
Рет қаралды 227 М.
10 Tailwind Classes I Wish I Knew Earlier
13:31
Web Dev Simplified
Рет қаралды 201 М.
min(), max(), and clamp() are CSS magic!
18:12
Kevin Powell
Рет қаралды 303 М.