Тёмный

I finally found a great use-case for flex-basis! 

Kevin Powell
Подписаться 943 тыс.
Просмотров 58 тыс.
50% 1

Опубликовано:

 

27 сен 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 79   
@programmingjobesch7291
@programmingjobesch7291 Год назад
I hate short videos. This one was great. Genuinely perfect length video per the subject matter.
@CottidaeSEA
@CottidaeSEA Год назад
I'm not too fond of them either, but it really just depends on the presentation. This went over the subject really well and it was easy to understand his point.
@chrisbolson
@chrisbolson Год назад
Another advantage, as you mentioned in the original video, is that flex-basis can be animated.
@ayoublaarouchi
@ayoublaarouchi Год назад
height and width can't be animated ?
@juliosantiesteban7709
@juliosantiesteban7709 Год назад
This is for me, just superb
@timgreller
@timgreller Год назад
​@@ayoublaarouchinot if you have `height: auto;`
@chrisbolson
@chrisbolson Год назад
@@ayoublaarouchi yes, but you will have to also switch this to width in the media query and change the height…. Animating the flex-basis is just simpler
@ayoublaarouchi
@ayoublaarouchi Год назад
@@chrisbolson ok
@tomiaiyeniko2242
@tomiaiyeniko2242 Год назад
Wow, nice finding. I've been using it as an alternative for basic width on flex items, never thought of this 😅
@Wolfendeathx
@Wolfendeathx Год назад
If I had watched RU-vid first thing this morning instead of coding, I could've saved myself a couple of hours trying to figure this out myself lol Good vid as always ^.^
@kopilkaiser8991
@kopilkaiser8991 Месяц назад
Amazing tutorial. I found this video very helpful and useful. I find flex to be easy, intuitive, and very useful now. All thanks to you☺️👏
@user-bi2so9dr3t
@user-bi2so9dr3t Год назад
I just wanted to say that i apreciate so much the detail of turn the HTML body into dark mode. That's make all difference between watch the video or avoid it. Thanks!
@paulm.7967
@paulm.7967 Год назад
I was just looking at ways to make this layout pattern in a simple way 😅 great use case for flex-basis!
@aamiramin6112
@aamiramin6112 Год назад
Brilliant real-world example. Thanks for sharing Kevin.
@yousafsabir7
@yousafsabir7 Год назад
Now I respect flex-basis
@TokyMahefarison
@TokyMahefarison Год назад
very cool, thanks Kevin!
@justme3393
@justme3393 Год назад
Wow I'm yet to need this buh thanks for sharing this. It'll definitely gonna be in handy. Thank you so much
@joshuaberrios
@joshuaberrios 7 месяцев назад
What a clutch use case. Glad you had a video on this. I, too, was just met with a use-case scenario hahaha
@arandomguy9669
@arandomguy9669 8 месяцев назад
Yes, i used this method to animate these kinda cards a few months ago.
@allenwang3464
@allenwang3464 Год назад
that's very useful in this condition !!!
@jugibur2117
@jugibur2117 Год назад
Great stuff, thanks!
@ItzAshOffcl
@ItzAshOffcl Год назад
King of css for a reason!⚡️🔥🤘🏻
@artu-hnrq
@artu-hnrq Год назад
Really interesting to understand that, thanks for the sahring!
@whizzbang7520
@whizzbang7520 Год назад
Thanks for showing us this
@jotasenator
@jotasenator Год назад
happy to see you again Sr.
@bushigi5913
@bushigi5913 Год назад
Amazing!!
@dzisonline
@dzisonline Год назад
Wow, nice one.
@ΝικόλαοςΤζουνάκος
awesome awesome!!
@sdfsfsfd437
@sdfsfsfd437 Год назад
Very useful explanation! Many thanks. Muchas gracias, me ha servido mucho.
@KerimKaraman28
@KerimKaraman28 Год назад
Nice t-shirt. Much love Kevin.
@synergydevelopment3666
@synergydevelopment3666 Год назад
Nice one as usual Kevin
@osirustwits
@osirustwits Год назад
fantastic
@Technoph1le
@Technoph1le Год назад
Hi, Kevin! I have a video request on animation with grid. Would love to see how you would approach to it.
@sbtopzzzlg7098
@sbtopzzzlg7098 Год назад
I once used "flex-basis: 0; flex-grow: 1" for divs inside a flexbox to make sure they are evenly sized regardless of the child size... Not sure if it's the best way to do it though 🙃
@JohnnyB.Good10
@JohnnyB.Good10 Год назад
.flex-container > * { flex: 1; } or .flex-container > * { width: 100%; }
@icdesignervishal8768
@icdesignervishal8768 Год назад
hello kevin sir can you please make video playlist on 1 landing page website using html, scss and js which have also dark mode and light mode ? it helps to understand how we can change colors using $ variable on dark mode or other scss concepts like responsive font size, etc ! thank you
@golamrabbani1810
@golamrabbani1810 Год назад
Great Sir
@StarOnCheek
@StarOnCheek Год назад
How is flex-basis different from inline-size though?
@KevinPowell
@KevinPowell Год назад
flex-basis is based on the flex-direction, inline-size is based on the writing direction, so that will only change if you change the writing mode to be vertical
@robbyawaldi
@robbyawaldi Год назад
how about flex shrink
@KevinPowell
@KevinPowell Год назад
flexbox would be kind of useless without it imo! It's on by default for a reason :D - It's great that items, by default, shrink down to their size. Imagine doing a navigation, and doing display: flex and they didn't have the room to go next to one another 😔
@PascalHorn
@PascalHorn Год назад
2:24 I can already hear the customers yelling from miles away. “Why is my image cropped this way, the other 20 people on my photo don’t fit anymore. 🙄😂
@PascalHorn
@PascalHorn Год назад
Nevertheless, great use case, love it. Thanks for sharing with us. 😊
@smaza2
@smaza2 Год назад
flex-basis use-casis
@nomadshiba
@nomadshiba Год назад
epic
@newtojillo
@newtojillo Год назад
I'm now edging much closer to mastering flexbox and it's properties thanks to you @KevinPowell
@วิรัลคเณสุข
ขอขอบคุณ
@KevinPowell
@KevinPowell Год назад
Thank you so much!
@honzosaurus42069-no_furry
@honzosaurus42069-no_furry Год назад
Me getting the image quality higher simply by adding img{ filter: blur(-150px); }
@pixiedustdreams
@pixiedustdreams 11 месяцев назад
understood nothing
@DineshGupta-fw6zh
@DineshGupta-fw6zh Год назад
@kevin_powell sir can you make RU-vid logo with CSS.❤
@daishzen
@daishzen Год назад
Something that always annoys me with flex is that inputs don't respect flex shrink unless you explicitly set a width/height (depending on direction), and always ignore flex-basis. Is there any way around that?
@KevinPowell
@KevinPowell Год назад
I forget the technical reason that this works, but if you declare `min-width: 0`, then `flex-basis` works.
@5erena
@5erena Год назад
I used flex basis once two days ago like a solution to a problem and now this video shows up, it's chasing meee
@MichaKurzewski
@MichaKurzewski Год назад
whenever i/we style something and I talk to my collegues I say somethingg like: yea you know, i've seen CSS King do this recently this way. They are like: who?... and i dont remember your real name cause in my head youre CSS King :D
@BossPetta
@BossPetta Год назад
Very useful Kevin! Thanks! 😄
@shuvkareview1223
@shuvkareview1223 Год назад
Thanks Kevin
@27sosite73
@27sosite73 9 месяцев назад
thank you
@pradeepn7
@pradeepn7 Год назад
Thanks.
@soumiarouba2729
@soumiarouba2729 Год назад
hi sir please please help me i want to be frontend dev so i start learning html css but when i come to start build to practice i find it hard so can you tel me the solution and please i need to know how to learn like see video after practice please answer me please
@KevinPowell
@KevinPowell Год назад
practice, practice, practice. Like anything else, you gotta work at it, it's not easy and takes a lot of time. Videos, tutorials, and all that are cool, but it's actually doing it where you learn the most.
@petarkolev6928
@petarkolev6928 Год назад
Wow, Kevin, amazing!!!
@mraug1865
@mraug1865 Год назад
Thanks you so much sir
@JasonJA88
@JasonJA88 Год назад
👍
@Atractiondj
@Atractiondj Год назад
If you think that Apple employs some of the best specialists, explain why this does not work in the Safari browser. :root {--flh: calc(100% + 8px);} .selector { font-size: 16px; line-height: 1.5em; /* Fallback */ line-height: var(--flh); In all browsers, it works without Fallback, and in Safari it doesn't even work with it. Selector {line-height: var(--flh, 1.5em);} also does not work, why?
@KevinPowell
@KevinPowell Год назад
Huh, seems to be a bug there for sure. Gonna dig in deeper and potentially file a bug report since I couldn't find one, but in this case, because of how line-height is calculated, 100% = 1em, so you could do `calc(1em + 8px)` and it'll work the same, and works in Safari. The fallback when you use var(--flh, 1.5em) doesn't work because --flh exists. Fallbacks don't look if they're valid or not, just if it exists or not. You could put "red" in there and it would wouldn't go to the fallback.
@Atractiondj
@Atractiondj Год назад
@@KevinPowell solution with 1em + 8px works the same, and works in Safari, is a solution, but the most interesting thing (100% + 8px) is that this does not work not in the same browser for iOS, even Mozilla or Chrome. For solution, thanks
@lawrencedoliveiro9104
@lawrencedoliveiro9104 Год назад
Safari is crap.
@lambmaster
@lambmaster Год назад
Awesome! But how can I animate the accordion to expand to the EXACT height of its contents?
@KevinPowell
@KevinPowell Год назад
They're adding some stuff to CSS that makes it a lot easier, but I think it's a ways off still. For now, you need to use JS.
@chrisbolson
@chrisbolson Год назад
You can “fake” it by using max-height and animating it to a height that you know is greater than your contents. The animation will stop when it runs out of contents and not actually reach the max-height that you set.
@shahidshafi1227
@shahidshafi1227 Год назад
I would like to see a video upon how we can write minimum css/scss for a website with dark and light mode
@KevinPowell
@KevinPowell Год назад
I have a video coming in just over 2 weeks that looks at minumum for a responsive and decent looking page that's 25 lines of CSS and includes dark mode 😃. I mean, you can do it with one line if you want html { color-scheme: light dark; } !
@shahidshafi1227
@shahidshafi1227 Год назад
@@KevinPowell I am currently using sass with reactjs but i want to write minimum css with proper classes without affecting other components throughout web application
@TheHumanistX
@TheHumanistX Год назад
Internal styles, you CSS god, you
@KevinPowell
@KevinPowell Год назад
🤣 - Shows how often I use them, lol. Only time I bother mentioning them is usually when I'm doing very beginner content and then we move on quickly :P - granted they can be useful for stuff like critical css as well.
@lawrencedoliveiro9104
@lawrencedoliveiro9104 Год назад
When my page is being generated programmatically (e.g. from Python code), I like to include the CSS in the generated output as well. This also makes it easier to refresh the page to pick up changes. I hit trouble when the page links to a separate URL for the CSS, where it doesn’t pick up changes to the latter.
@TheHumanistX
@TheHumanistX Год назад
@@lawrencedoliveiro9104 What is this voodoo you are talking about that I have never heard of...? Page generated programmatically from python code...?
Далее
Stop over-engineering your CSS
3:55
Просмотров 93 тыс.
Flexbox design patterns you can use in your projects
15:33
TEAM SPIRIT: НОВЫЙ СОСТАВ. SEASON 24-25
01:31
Flexbox is more complicated than you thought
22:42
Просмотров 153 тыс.
Please stop using px for font-size.
15:18
Просмотров 168 тыс.
How to take control of Flexbox
16:01
Просмотров 135 тыс.
The thing people get wrong about flex-basis
9:00
Просмотров 60 тыс.
Flex grow, shrink, basis | CSS Flexbox tutorial
8:42
Avoid These 5 Awful CSS Mistakes
20:42
Просмотров 194 тыс.