No video

The border property you never knew you needed

  Рет қаралды 96,598

Kevin Powell

Kevin Powell

Күн бұрын

Пікірлер: 187
@zachjensz
@zachjensz Жыл бұрын
This is borderline fantastic
@KevinPowell
@KevinPowell Жыл бұрын
🥁
@-_._._-
@-_._._- Жыл бұрын
This comment should be pinned for posterity :P
@sonjadilan777
@sonjadilan777 Жыл бұрын
🤣💪🏾🔥😎
@OLDACCOUNT_notfireman
@OLDACCOUNT_notfireman Жыл бұрын
No, this is borderline godtier. Saying borderline fantastic is the same as saying barely fantastic
@kdot78
@kdot78 Жыл бұрын
@@OLDACCOUNT_notfireman okay Shakespeare
@Luxalpa
@Luxalpa 5 ай бұрын
5:38 "This isn't what you'd think it is" - that's a great description of CSS properties in general!
@kncle
@kncle Жыл бұрын
This is so cool. I want to see more of these little design hacks for common designs patterns.
@graysonpeddie
@graysonpeddie Жыл бұрын
I have just implemented the transparent gradient border in my website thanks to you! Awesome! I actually use it in an :after element behind the semi-transparent background for my articles with the z-index set to -1. 😃
@sergnio
@sergnio Жыл бұрын
I couldn't figure out why it wasn't working, but of course coming to a Kevin Powell video you learn exactly what you need
@Vattevaii
@Vattevaii Жыл бұрын
Damn .. been searching all over the place for gradient borders.. I just used to add multiple backgrounds with proper positioning and size to emulate gradient borders.. or just layer ::before to get gradient border.. This was too informative Love you bro
@AlvinIsChipmunk
@AlvinIsChipmunk Жыл бұрын
for gradient border i always use background: linear-gradient and changing border to transparent. background: linear-gradient(#fff 0 0) padding-box, linear-gradient(to right, #9c20aa, #fb3570) border-box; border: 10px solid transparent; first linear-gradient is basically your background color to fill only the padding box while sitting on a second linear gradient which is the gradient that fills to the whole border area.
@Way_Of_The_Light
@Way_Of_The_Light Жыл бұрын
Hey quick question, How do you make the border show up inside the box? Like an inner frame of a Tarot Card? 🙏
@AlvinIsChipmunk
@AlvinIsChipmunk Жыл бұрын
@@Way_Of_The_Light I only know how to do it with solid colors with box-shadow inset... Or a negative outline-offset.. creating a pseudo element sortof works too(by making width and height smaller than the parent)...
@mcnagynorbi
@mcnagynorbi Жыл бұрын
@@Way_Of_The_Light You can have two borders actually. You can use outline as a second border around it.
@Way_Of_The_Light
@Way_Of_The_Light Жыл бұрын
I see, Thanks for the answers guys 🙏
@anafro_ru
@anafro_ru 20 күн бұрын
border-image is like that one candy on the bottom of the package - you don't really expect so much from it, its name is kind of boring and not really promising, but when you unwrap it, you realize - it is the most delicious candy of all times
@shakirdodhiya8770
@shakirdodhiya8770 Жыл бұрын
Nice content Kevin I also used gradient borders in some of my recent projects One drawback is that it doesn't work with border radius
@paulooliveira8976
@paulooliveira8976 6 ай бұрын
Welcome to the styling side!!
@askjamesss
@askjamesss Жыл бұрын
KP CSS Tutorials as it's finest. ☝️🙌
@chrisicotec7652
@chrisicotec7652 Жыл бұрын
css used to stress me out, this channel makes it much less scary and confusing
@StefanoVolponi
@StefanoVolponi Жыл бұрын
The first 30 seconds are enough to make me feel oooooooooooooold
@YurijVolkov
@YurijVolkov Жыл бұрын
Last time I use border-image when it was as an exercise in a paper tutorial book and it was almost useless in real world. But now, with a gradient, that might be usable! Thanks!!
@user-sy7lm6lw8i
@user-sy7lm6lw8i Жыл бұрын
Perfect, I am coding my small project now, as I am not a designer i try to make things look simple, but i always want to add some artistic touch to them. The transparent border is something i need)
@NIronwolf
@NIronwolf Жыл бұрын
Here's a fun "highlight the corners" snip-it. Setup your own color and the transparent percents can tune how quick it fades out on each corner. The "to" keeps it pointed at the other corner if your container changes size. border: 0.3rem solid; border-image-source: linear-gradient( to bottom right, $color, transparent 30%, transparent 80%, darken($color, 10%) ); border-image-slice: 1;
@peternicholson26
@peternicholson26 Жыл бұрын
that was some pretty slick border action. I need to inject this knowledge into the designers at work so they only design based off the things I already know ha
@StevenDavisPhoto
@StevenDavisPhoto Жыл бұрын
Omigosh! I didn't know this was doable! This video would have helped when I needed to do a gradient border a while back. Dang. Haha.
@giorgiteliashvili5268
@giorgiteliashvili5268 5 ай бұрын
Thanks for your explanation, very clear and helpful, fantastic!
@santhoshh4748
@santhoshh4748 Жыл бұрын
These videos should be paid
@j7coder
@j7coder Жыл бұрын
Amazing!! You make me fall in love with css!
@angrytvrobot6130
@angrytvrobot6130 Жыл бұрын
Holy crap this is mindblowing. Thank you! I'm going to mess around with this on my current project.
@__anasmustafa
@__anasmustafa Жыл бұрын
Get well soon Kevin! Great content as always!
@nicholaskane69
@nicholaskane69 Жыл бұрын
I use these to put 'Final Fantasy 7'-style borders around UI elements on my Twitch streams. They're great!
@MrAsgardian1987
@MrAsgardian1987 Жыл бұрын
You just saved me some serious design headache (Y)
@tworsfeline2302
@tworsfeline2302 Жыл бұрын
I like that that CSS property now exists. ("that that" isn't a typo, it is weird grammar in English)
@TheRalic
@TheRalic Жыл бұрын
Excellent video, never used borders like that and I think I will start using it from now on ^_^
@nonchain
@nonchain Жыл бұрын
Man you just saved my life with this tutorial Thanks a lot
@sharkinahat
@sharkinahat Жыл бұрын
Remember when border-radius wasn't a thing and everything had a gif border-image? Pepperidge farm remembers.
@vectork3
@vectork3 7 ай бұрын
This is really cool. Thank you sir!
@solaarsslave
@solaarsslave Жыл бұрын
i almost always learn something new, thanks!
@eothica
@eothica Жыл бұрын
lol saved me hours with that mozilla border image generator
@ahmedharb88
@ahmedharb88 Жыл бұрын
great explanation Kevin ♥ so could you provide us a tutorial about : circular progress border using CSS
@KevinPowell
@KevinPowell Жыл бұрын
We could do something fun with that!
@ahmedharb88
@ahmedharb88 Жыл бұрын
@@KevinPowell thanks a lot for that
@chrisozz2007
@chrisozz2007 Жыл бұрын
this was great. was able to use it immediately at work. Thanks
@anaselhassani2545
@anaselhassani2545 Жыл бұрын
THANK YOU SO MUCH FOR THIS VIDEO
@SnehilCodes
@SnehilCodes Жыл бұрын
Still looking forward to the day when border-image becomes compatible with border radius ;-;
@sabiruli
@sabiruli Жыл бұрын
This is amazing! Thanks @Kevin
@GauravKumar-ue7nz
@GauravKumar-ue7nz Жыл бұрын
Thanks Kevin
@balubalaji9956
@balubalaji9956 Жыл бұрын
enjoyed the examples at the end.. just wow
@bilatungdulang9708
@bilatungdulang9708 Жыл бұрын
Really fantastic thing from border image, thanks for sharing my friend
@juggles5474
@juggles5474 Ай бұрын
amazing video, thank you!
@rodbrowning
@rodbrowning Жыл бұрын
I think this is the only video about this subject in the internet
@Poutine-stratège-maladroit
@Poutine-stratège-maladroit Жыл бұрын
"The border property you never knew you needed" My negative side: "May be because we actually didn't need it?" My other side: "Just watch and shut up. You might actually happily use that one day".
@WarframeCrunch
@WarframeCrunch Жыл бұрын
Thanks for that, I didn't known about border-image
@thedelanyo
@thedelanyo Жыл бұрын
Your video contents are top notch Sir . Thanks.
@j.almadhaji
@j.almadhaji Жыл бұрын
Well, that's new Thank you Kevin
@Kawlinz
@Kawlinz Жыл бұрын
4:24 - "I mucked up my bottom a little bit" I do that from time to time - it's fine
@haliszekeriyaozkok4851
@haliszekeriyaozkok4851 Жыл бұрын
Very beautiful.
@mikodizon8322
@mikodizon8322 Жыл бұрын
great video! Thanks kevin!
@blackcheetah4550
@blackcheetah4550 Жыл бұрын
Very useful video, thanks
@smsmsmow4109
@smsmsmow4109 Жыл бұрын
wow >> you are amazing
@oleksandrvorovchenko8674
@oleksandrvorovchenko8674 Жыл бұрын
Thanks! Very useful, as usual.
@wayneswildworld
@wayneswildworld Жыл бұрын
Awesome video!!!
@matthewblasco4720
@matthewblasco4720 Жыл бұрын
🤩🤩🤩🤩 ty for making css awesome
@millos0116
@millos0116 Жыл бұрын
I really enjoy your tutorials, voice and positive energy, God bless you brother🙏💙
@Gelo2000origami
@Gelo2000origami Жыл бұрын
Watching you makes me want to ditch tailwind and just use css
@KevinPowell
@KevinPowell Жыл бұрын
That just made my day 😅
@n0n1m
@n0n1m Жыл бұрын
Mind blowing and really beautiful:)
@octothorpe12
@octothorpe12 Жыл бұрын
I've needed something akin to the radial gradient tip at the end, where you want something similar to 'mounting corners' in a photo album. Adjusting the stops to give a hard start to the transparency would be perfect!
@tcgvsocg1458
@tcgvsocg1458 Жыл бұрын
genius! thx a lot
@MichaelWestcott
@MichaelWestcott Жыл бұрын
Using border-image was pretty common before CSS3
@arshad1781
@arshad1781 Жыл бұрын
Thanks 👍
@estonian44
@estonian44 Жыл бұрын
dang, u r wizard
@overwatch9659
@overwatch9659 Жыл бұрын
Great video 🙏🏾🖤
@drenskywalker
@drenskywalker Жыл бұрын
✨ magic ✨
@piterparker990
@piterparker990 Жыл бұрын
its work thx brother 🙏
@quintenmantez6934
@quintenmantez6934 Жыл бұрын
Nice!!! Thx!
@uc9773
@uc9773 Жыл бұрын
Such a cool things~ thx
@sarsario
@sarsario Жыл бұрын
Good stuff
@czerskip
@czerskip Жыл бұрын
Lovely! 🎨 Now, how about we combine images, gradients, clipping/blending and pseudoelements, and we get photo cutouts for borders… 🤔
@KevinPowell
@KevinPowell Жыл бұрын
I did it with cut corners and a gradient awhile back, you could probably use the same technique with an image - kzfaq.info/get/bejne/l71mpKhytrnHpI0.html
@grasshopperweb
@grasshopperweb 3 ай бұрын
Just realized that I way overengineered gradient borders for my first client's website 😅
@lazy07
@lazy07 Жыл бұрын
Nice video will help me in my next Website 👍
@danisob3633
@danisob3633 Жыл бұрын
I love it
@Sean-Smith-Photos
@Sean-Smith-Photos Жыл бұрын
Very cool
@wahyusa
@wahyusa Жыл бұрын
Cool !! 💯💯💯
@PAULUS-nh2yo
@PAULUS-nh2yo 2 ай бұрын
We are brother
@jameswrightson744
@jameswrightson744 Жыл бұрын
Also known as a 9 slice on video games 🔥
@tinguyen_dev
@tinguyen_dev 9 ай бұрын
How about the gradient border with radius? And transparent background also.
@VasilyPavlik
@VasilyPavlik Жыл бұрын
Typing "Brilliant!!!" and start watching the video :)
@Eleanor8965
@Eleanor8965 Жыл бұрын
This was great! I am curious however on how you'd mix this with adding a border radius as well. It seems that the two "fight" one another.
@KevinPowell
@KevinPowell Жыл бұрын
Yeah it's one or the other with border-image :)
@Eleanor8965
@Eleanor8965 Жыл бұрын
@@KevinPowell Thank you for this video and for your response. Also, I was the guy who emailed you last week about this very topic. This channel is awesome!
@captuhu
@captuhu Жыл бұрын
right now if you want a round corner it would have to be included as part of the image. I have a github issue open with the CSSWG on making gradient border-image with work with border-radius.
@balubalaji9956
@balubalaji9956 Жыл бұрын
wow nice.
@onnot701
@onnot701 Жыл бұрын
I wonder if you design straight in css and hrml or still use figma?
@aymanayman8209
@aymanayman8209 Жыл бұрын
Sir, I would like to see you create a 2D intro with css, and by the way its because of you I loved css. Thank you for the amazing videos.
@quicktastic
@quicktastic Жыл бұрын
Borderline was Madonna's best song.
@user-bg6zk3ly5v
@user-bg6zk3ly5v Жыл бұрын
Hi Kevin, great video. I have a question, is it possible to do the last border and both sides?
@murshid9033
@murshid9033 Жыл бұрын
Can you do a video on animating gradient borders
@cacowen
@cacowen Жыл бұрын
Thanks for the video. Good stuff. Would this be a good use case for throwing a loading "spinner" on a button? I played around a bit and think the Gradient Example 2 approach with an animation altering the deg would make it look like a loading bar and perfect for a button. Throw the loading class on the button when it is clicked, and remove that class when the process is finished.
@crifox16
@crifox16 Жыл бұрын
yeah that's what i was thinking too, especially with example three with a rotate animation
@a_d_z_y__
@a_d_z_y__ Жыл бұрын
I wonder how this would interact with border-radius though
@clamhammer2463
@clamhammer2463 Жыл бұрын
Could you use container queries to make slice more dynamic?
@taneshpatel3051
@taneshpatel3051 Жыл бұрын
Informative..
@sanfords
@sanfords Жыл бұрын
Gad. This just feels like the typical css pit of - "what if I change that?" There are parts of this even you don't understand. How this will behave in all enviornments seems like a nightmare to me.
@COLI_ALVAREZ
@COLI_ALVAREZ Жыл бұрын
Hello! thanks for the video, very help full! which is the right size for an image not to pixel when using this property?
@Jakiita1
@Jakiita1 Жыл бұрын
I've been stuck trying to figure out an animated border-gradient with a Border radius while keeping a transparent background. I've seen ur animated border gradient video but with that method it looked like you need a 'background' for the card at the front to hide the gradient thats behind it. Is there a way to make an animated border with round corners? The SVG videos gave me the impression the gradient cannot be done in the CSS only in HTML, am I understanding that right?
@masonashlock5461
@masonashlock5461 Жыл бұрын
The lorim ipsom was... Distracting.
@Rocadamis
@Rocadamis Жыл бұрын
TIP: Turn OFF the annoying Editor Hover feature that shows the MDN Reference and keeps popping up during videos in VS Code. Just go to Code -> Preferences -> Settings Search "editor hover enabled" and disable checkbox.
@MathGeekQ
@MathGeekQ Жыл бұрын
nice
@Way_Of_The_Light
@Way_Of_The_Light Жыл бұрын
Hey quick question, How do you make the border show up inside the box? Like an inner frame of a Tarot Card? 🙏
@KevinPowell
@KevinPowell Жыл бұрын
The image source could have a transparent gap on the outside for the spacing you want there, and then the image/pattern is inset a little bit, then it's just playing with the slicing
@Way_Of_The_Light
@Way_Of_The_Light Жыл бұрын
@@KevinPowell I see, thank you so much for replying 🙏
@NotKyleChicago
@NotKyleChicago Жыл бұрын
If you used "fill", would there be a lime green semicircle in the top left?
@ev721
@ev721 Жыл бұрын
Damn!
@silasdaniel1850
@silasdaniel1850 Жыл бұрын
useful
@madameknees
@madameknees Жыл бұрын
How does this interact with border-radius, and how many of these properties are animatable?
5 super useful CSS properties that don't get enough attention
16:23
Kevin Powell
Рет қаралды 144 М.
Why I use grid over flexbox for this common layout
7:32
Kevin Powell
Рет қаралды 235 М.
Kids' Guide to Fire Safety: Essential Lessons #shorts
00:34
Fabiosa Animated
Рет қаралды 14 МЛН
Zombie Boy Saved My Life 💚
00:29
Alan Chikin Chow
Рет қаралды 7 МЛН
OMG what happened??😳 filaretiki family✨ #social
01:00
Filaretiki
Рет қаралды 12 МЛН
Relative colors make so many things easier!
13:16
Kevin Powell
Рет қаралды 47 М.
Markdown - напиши README за 2 минуты
21:40
letsCode
Рет қаралды 49 М.
Revolutionize Web Development with FastHTML: A Python-Only Approach
19:20
Code Voyage with Iman
Рет қаралды 363
6 things I wish I knew about CSS when I started
9:09
Kevin Powell
Рет қаралды 225 М.
Naming things just got easier thanks to @scope
26:22
Kevin Powell
Рет қаралды 46 М.
10 CSS animation tips and tricks
20:13
Kevin Powell
Рет қаралды 174 М.
CSS Outline vs Border - differences, advantages, and disadvantages
10:06
How To Load Images Like A Pro
15:48
Web Dev Simplified
Рет қаралды 368 М.
We can now transition to and from display: none
21:20
Kevin Powell
Рет қаралды 96 М.
Kids' Guide to Fire Safety: Essential Lessons #shorts
00:34
Fabiosa Animated
Рет қаралды 14 МЛН