How you can simplify your CSS with :is()

  Рет қаралды 333,424

Kevin Powell

Kevin Powell

3 жыл бұрын

The :is() pseudo-class is relatively new, but browser support is pretty good now! It's a nice way to dry up your CSS and turn some otherwise complex selectors into something much more managable!
Codepen: codepen.io/kevinpowell/pen/Rw...
Step up your game with advanced CSS selectors and combinators: • Step up your CSS game ...
#css
--
Come hang out with other dev's in my Discord Community
💬 / discord
---
Keep up to date with everything I'm up to
✉ www.kevinpowell.co/newsletter
---
Help support my channel
👨‍🎓 Get a course: www.kevinpowell.co/courses
👕 Buy a shirt: teespring.com/stores/making-t...
💖 Support me on Patreon: / kevinpowell
---
My editor: VS Code - code.visualstudio.com/
---
I'm on some other places on the internet too!
If you'd like a behind the scenes and previews of what's coming up on my KZbin channel, make sure to follow me on Instagram and Twitter.
Instagram: / kevinpowell.co
Twitter: / kevinjpowell
Codepen: codepen.io/kevinpowell/
Github: github.com/kevin-powell
---
And whatever you do, don't forget to keep on making your corner of the internet just a little bit more awesome!

Пікірлер: 596
@guillermoandradaFSD
@guillermoandradaFSD 3 жыл бұрын
I didn't know that even exist... Thank you Kevin
@devchaudhary78
@devchaudhary78 3 жыл бұрын
Same
@kingpeterpanes7196
@kingpeterpanes7196 3 жыл бұрын
wait, so this feature is not new?
@Gauravguptakumar
@Gauravguptakumar 3 жыл бұрын
Same here
@danielsharp2402
@danielsharp2402 3 жыл бұрын
@Greyson Mario Advertise in a place where people are not already programmers and know this is a bunch of bullshit. Might save you some pennies on the bots.
@xxgn
@xxgn 3 жыл бұрын
@@kingpeterpanes7196 It's pretty new, though part of the confusion is that it's been renamed a couple times. It was previously called :matches and :any , but those names are now deprecated. I'd hesitate to use this in production until developer.mozilla.org/en-US/docs/Web/CSS/:is#browser_compatibility has more green in it.
@SebastianZartner
@SebastianZartner 3 жыл бұрын
When talking about :is(), you should also talk about the very similar :where() pseudo-class, which has the only difference that it has 0 specificity. :is(), on the other side, takes on the specificity of the most specific selector in it.
@DFPercush
@DFPercush 3 жыл бұрын
Thanks for the tip!
@xellr
@xellr 3 жыл бұрын
But if that is the only specificity, then is it better to work with :where() rather than with :is() ?
@RD-jr8nv
@RD-jr8nv 3 жыл бұрын
@@Jens-OS Tu est Francais?
@pradeepsaravanan7712
@pradeepsaravanan7712 3 жыл бұрын
@@Jens-OS sure
@RC-zf7hp
@RC-zf7hp 2 жыл бұрын
😊 thanks!
@uros.u.novakovic
@uros.u.novakovic 3 жыл бұрын
This randomly appeared in my youtube recommendations, I didn't even know :is() exists. This'll come in handly I'm sure. Thanks for the video!
@KevinPowell
@KevinPowell 3 жыл бұрын
Glad you enjoyed it!
@uros.u.novakovic
@uros.u.novakovic 3 жыл бұрын
@@Jens-OS No.
@kunleadelowo1106
@kunleadelowo1106 3 жыл бұрын
My CSS has really improved from following and watching your content. Thanks a lot for your work
@codeSTACKr
@codeSTACKr 3 жыл бұрын
Awesome!
@JesusFriend
@JesusFriend 3 жыл бұрын
@@Jens-OS You need content and have none get content then ask again
@Morrile1
@Morrile1 3 жыл бұрын
Once again Kevin produces a gem of valuable useful and practical information. I love the way Kevin explains in ways we can understand and learn 👍 👍 👍
@PaulValickas
@PaulValickas Жыл бұрын
Nope. This was waist of time the only useful info is :is is useless.
@example101
@example101 3 жыл бұрын
Nice work fella! A quick look at several of your vids shows a great library of PRO tips.
@saschab.5154
@saschab.5154 Жыл бұрын
Was looking for this solution for ages, thanks so much for sharing!
@jbyork
@jbyork 3 жыл бұрын
This is an awesome video! Thanks for explaining this so thoroughly but also being so concise!
@protocode_227
@protocode_227 3 жыл бұрын
I love watching Kevin talking about the specificity of things 😌
@victorwestmann
@victorwestmann 3 жыл бұрын
Super handy and well explained video. Thanks for sharing your knowledge Kevin!
@shngsam8777
@shngsam8777 3 жыл бұрын
Thanks for the video! great note there on specificity , very useful
@ajibolanle
@ajibolanle 3 жыл бұрын
I only started watching KP's videos about two months ago and the massive value it has added to my CSS skills is just unbelievable! Great work, Kevin! You're awesome!!
@FririkurEllefsen
@FririkurEllefsen 3 жыл бұрын
Very informative. Kudos for warning us about the specificity hurdle. Thank you
@vitorgobatogercov8879
@vitorgobatogercov8879 3 жыл бұрын
Your classes are always amazing, thank you for these incredible videos, much love :)
@calvijn7717
@calvijn7717 3 жыл бұрын
his glasses to
@keeganhinnigan
@keeganhinnigan 3 жыл бұрын
really useful to knoq, will be using this in my next project. thanks kevin :)
@maskman4821
@maskman4821 3 жыл бұрын
This is a very practical / useful / informative tutorial, thank you Kevin !!!
@johnkeck
@johnkeck 3 жыл бұрын
Thanks, Kevin! That was tremendously useful, especially with the caveats!
@luiscolome75
@luiscolome75 3 жыл бұрын
I had no idea of :is!! Very nice tutorial Kevin. As always I've learn something with your videos. This is why you were in The State of CSS survey. I didn't get the specificity "issue". I guess I have to watch it again...Great job Kevin! Thanks million for your videos.
@rimzzlabs
@rimzzlabs 3 жыл бұрын
thank you for the tips Sir Kevin, very helpful for me! i will wait for your next videos!
@mariajackson8923
@mariajackson8923 3 жыл бұрын
Great explanation. I always learn so much from you.
@danielschutzsmith9399
@danielschutzsmith9399 3 жыл бұрын
didn’t even know this was a thing! Thanks so much for the quick and informative overview.
@SuperDHARU
@SuperDHARU 3 жыл бұрын
That was absolutely new and useful method. You're do natural and explains very easily. Keep exploring such things! 🤘
@KevinPowell
@KevinPowell 3 жыл бұрын
Thank you! 😃
@marksmith5434
@marksmith5434 3 жыл бұрын
Just subscribed - to the point and incredibly insightful. Thankyou 😎
@vipvids1o5
@vipvids1o5 3 жыл бұрын
Great stuff!!! really liked the specificity part
@KevinPowell
@KevinPowell 3 жыл бұрын
Glad you enjoyed it
@simplymusical4583
@simplymusical4583 2 жыл бұрын
As always, thank you so much for sharing!
@PaulBilton
@PaulBilton 3 жыл бұрын
absolutely fantastic tip! thank you for posting this up
@joserabn7156
@joserabn7156 3 жыл бұрын
Thank you Kevin, I will start applying this at work today. Your the best!.
@XanarkanD
@XanarkanD 3 жыл бұрын
I appreciate your specificity explanation. As a new developer these little technicalities can be aggravating if you don't know about them!
@patriayvida4209
@patriayvida4209 3 жыл бұрын
WoW ! Great information Kevin. Thanks a lot ! I've just learned something new bro!
@waleedanjum
@waleedanjum 3 жыл бұрын
Superb.. i really like this man. You increased my knowledge and its very helpful
@mrshawnspencer
@mrshawnspencer 3 жыл бұрын
THANK YOU for posting this. Awesome stuff. Stay safe & healthy.
@emkisn
@emkisn 3 жыл бұрын
Really amazing selector, thanks a lot for sharing
@miguelagawin
@miguelagawin 3 жыл бұрын
Great tip! Thank you! Definitely use the space child selector a lot.
@TusharShukladevx
@TusharShukladevx 3 жыл бұрын
That was a nice explanation + I didn't know about that group specificity thing so thanks for that 😊
@TusharShukladevx
@TusharShukladevx 3 жыл бұрын
@@Jens-OS Ohh I'd love to subscribe to your channel but sadly I hate spammers.
@samuelwuw
@samuelwuw 3 жыл бұрын
Nice content! Is simple to understand, and this pseudo class is a powerfull tool in development! Thx for this vídeo!
@Ztekk1
@Ztekk1 3 жыл бұрын
WOW! My mind is blown, I had no idea about this. Glad this popped up in my recommendations.
@armaweb6809
@armaweb6809 3 жыл бұрын
Thx Kevin! Another useful things from you !!!
@JmenDem
@JmenDem 3 жыл бұрын
Really cool! It was the first video I've watched on this channel! You've got a new subscriber) I am in FE for 6 years, and last 4 years I'm using SCSS. IMHO SCSS is much easier, don't even know if I'll need this "is(...)" pseudo
@RajPhotoEditingMuchMore
@RajPhotoEditingMuchMore 3 жыл бұрын
😲 wow! Thanks ☺ a lot sir 🙏Very unique and interesting information 👍
@JaredNichols909
@JaredNichols909 3 жыл бұрын
Very cool. You do a great job explaining and introducing these subjects.
@KevinPowell
@KevinPowell 3 жыл бұрын
So happy to hear that!
@CoreDreamStudios
@CoreDreamStudios 3 жыл бұрын
Nice trick, never knew about this until now, thank you!
@jvenkatonline
@jvenkatonline 2 жыл бұрын
Kevin, you are awesome. these are really time-saving tips. ':is()' is cool.
@dontargetme2416
@dontargetme2416 3 жыл бұрын
today i learned something new , thanks kevin you're awesome !
@adamswalks2385
@adamswalks2385 3 жыл бұрын
Super cool, thank you for creating and sharing!
@KevinPowell
@KevinPowell 3 жыл бұрын
Glad you enjoyed it and welcome aboard!
@roji4632
@roji4632 3 жыл бұрын
Thanks Kevin, I didn't know about this until nooow! This will be so helpful! Like and Subscribed!
@Seranuelian
@Seranuelian 3 жыл бұрын
You‘re really good at teaching/showcasing.
@christophermatt5925
@christophermatt5925 2 жыл бұрын
Your Tutorials are awesome! Thank you so much :-)
@RD-jr8nv
@RD-jr8nv 3 жыл бұрын
This seems excellent. Going to start using ASAP.
@kiggi__
@kiggi__ 3 жыл бұрын
Fantastic video, i am currently doing a course in software development and have covered HTML5 and CSS3 but not even this was mentioned in the course i had done.
@RC-zf7hp
@RC-zf7hp 2 жыл бұрын
Thank you 💗 you deserve millions of subscribers.
@mikielgrato5705
@mikielgrato5705 3 жыл бұрын
I'm new to css so this was Really helpful thanks a ton!
@louisgamor
@louisgamor 3 жыл бұрын
This is simply awesooooooommmmeeee. Love you Kevin. Big ups!
@hectorvasquez2874
@hectorvasquez2874 3 жыл бұрын
Super useful stuff... as always. Thanks!
@CHANDRASHEKAR-ox4qt
@CHANDRASHEKAR-ox4qt 2 жыл бұрын
Your research and teachings are so amazing sir
@franciscomagalhaes7457
@franciscomagalhaes7457 3 жыл бұрын
Good god, how have I never seen this before? That is so much better than how I have been doing things! Thanks a bunch!
@arpansrivastava9260
@arpansrivastava9260 3 жыл бұрын
whooo ! didn't know about that thanks for sharing it Kevin surely gonna use it for sure 👍
@ytkeebOo
@ytkeebOo 3 жыл бұрын
....always learning something new. as always, awesome video and thanks.
@ytkeebOo
@ytkeebOo 3 жыл бұрын
so happy to start using just now ;) [...] & :is(td,th):nth-child(1) { padding-left:1rem; text-align:left; width:70px; font-family:monospace; font-size:10px; } [...]
@jason0ng
@jason0ng 3 жыл бұрын
Super handy! Thank you 🙏
@CodingNuggets
@CodingNuggets 3 жыл бұрын
Never even heard of this pseudo class, but I'm not a CSS Ninja like you Kevin. Thanks for filling me in. See you soon!
@MikeDest
@MikeDest 3 жыл бұрын
Neat, been doing CSS since 1999 and didn’t know this existed. I need to figure out what else I don’t know. Subscribed
@ikazak
@ikazak 3 жыл бұрын
Valuable information, thanks!
@AhmadAlMutawa_abunoor
@AhmadAlMutawa_abunoor 2 жыл бұрын
I don't know if people tell you this or not. But I find you as a very likable and kind hearted man, the type people like to have around, despite not knowing you are just seeing you for the first time. I say this, because I for one can tell if someone is unpleasant, or evil looking by looking at his face. Your face, the way you talk, and how you present your content, says a lot about you. Oh, nice video by the way. Keep up the good work.
@martinlinden937
@martinlinden937 3 жыл бұрын
Had no idea you could do that. Good stuff!
@CoffeeDuoes
@CoffeeDuoes 3 жыл бұрын
WOW , thank you so much ! I live a sub. Ive been working with CSS files for a while and my setups can get messy, thanks so much for showing this method !
@Aspiiire
@Aspiiire 3 жыл бұрын
Thanks for sharing really loved this one!
@yupii1997
@yupii1997 3 жыл бұрын
Wow this is really useful clean and easy to read, had no idea this existed
@boxfreshpidge
@boxfreshpidge 3 жыл бұрын
Amazing! Only started using :not() so this is a nice addition
@paulm.7967
@paulm.7967 3 жыл бұрын
Oh man, I remember seeing this and wanting to use it but the browser support wasn't there yet. Great video; solid tut.
@KevinPowell
@KevinPowell 3 жыл бұрын
Thanks!
@colinwiseman
@colinwiseman Жыл бұрын
Was really confused by this :is() thinking that it didn't syntactically make sense header :is(). But really this is just a shorthand way of "header *:is()" and now I love it 😀 thanks for sharing. I will absolutely be using it.
@markdioneeb8997
@markdioneeb8997 3 жыл бұрын
THAT IS VERY USEFUL!!!! thank you very much
@berkaybakacak
@berkaybakacak 3 жыл бұрын
KZbin finally recommended such a helpful thing, thanks 😁
@arsh999cg
@arsh999cg 3 жыл бұрын
I love your tutorials mostly because of your joker cards you through like this and win the game. :)
@hoangcoitk5
@hoangcoitk5 3 жыл бұрын
wow. that is awesome usage of :is() thank you for sharing
@the-real-tridder
@the-real-tridder 2 жыл бұрын
Thanks Kevin, awesome info as always! #stillrelevant!
@LeandroSimoesArt
@LeandroSimoesArt 3 жыл бұрын
OMG! I really didn't know that! Thanks!
@ShawnRitch
@ShawnRitch 3 жыл бұрын
That :is good to know - thanks :)
@amosadewuni460
@amosadewuni460 2 жыл бұрын
Good explanation. Get it now. Thank you.
@abdillahsyafiq
@abdillahsyafiq 3 жыл бұрын
This is great! Thanks for sharing!
@KevinPowell
@KevinPowell 3 жыл бұрын
Glad you enjoyed it!
@jintal
@jintal 3 жыл бұрын
Good to know! Chaining multiple selectors (with a comma, or lots of nesting in Sass) can get slow, would be great to know how :is compares in speed
@nirzar52
@nirzar52 3 жыл бұрын
It made life easier! Thanks!
@DroidZed
@DroidZed 3 жыл бұрын
Thanks for the tip ! I didn't know about it but now I can make use of it in my website hehe :D
@xthukuh
@xthukuh 3 жыл бұрын
This info is useful. Thank you.
@LuisReyes-zs4uk
@LuisReyes-zs4uk 3 жыл бұрын
Your videos are awesome. Thank you.
@agnemedia624
@agnemedia624 3 жыл бұрын
I didn't know that even exist, Great. Thank you Kevin
@zen-zeo3223
@zen-zeo3223 2 жыл бұрын
thx, love your videos. very appreciated ^^
@MrFoghorn111
@MrFoghorn111 3 жыл бұрын
Very cool demonstration.
@chhavimanichoubey9437
@chhavimanichoubey9437 3 жыл бұрын
I've read about it recently but now i fully understand it thanks
@apex-lazer
@apex-lazer 11 ай бұрын
You’re so awesome thank you brother ❤
@AWM_2023
@AWM_2023 3 жыл бұрын
Thanks for making me feel like I know NOTHING about CSS, Kevin. Oh yeah, thanks SO MUCH, Kevin. How can I tell my friends now that I work and actually GET PAID for writing CSS code? 🤣 Great as always, Mr. Powell. Thank you very much.
@lomeshdaheria9960
@lomeshdaheria9960 3 жыл бұрын
Thanks for such an awesome content sir🙏😁😊🙂
@mrrolandlawrence
@mrrolandlawrence Жыл бұрын
wow once again.. awesome useful... things i never knew
@penguinxed
@penguinxed Жыл бұрын
very useful, thanks sir! :)
@lalitsoni004
@lalitsoni004 3 жыл бұрын
Awesome, thanks for sharing it.
@guilhermemoraes4055
@guilhermemoraes4055 3 жыл бұрын
That's really really cool !
@sskdev5116
@sskdev5116 3 жыл бұрын
Oh my God!!! You just made my life easy. This has reduced my CSS lines
@niteshkrsah2222
@niteshkrsah2222 3 жыл бұрын
As always awesome video
@techtips4019
@techtips4019 3 жыл бұрын
Great info and great video quality
@earthquake876
@earthquake876 3 жыл бұрын
Valueable as always. Thanks
@MrLucasEss
@MrLucasEss 3 жыл бұрын
Nice video once again! I'm just missing the codepen link in the description
@KevinPowell
@KevinPowell 3 жыл бұрын
I always forget the codepen link 😞 codepen.io/kevinpowell/pen/RwojMKB
The new CSS pseudo-classes explained - :is() :where() :has()
13:50
Kevin Powell
Рет қаралды 130 М.
Avoid These 5 Awful CSS Mistakes
20:42
Kevin Powell
Рет қаралды 188 М.
1🥺🎉 #thankyou
00:29
はじめしゃちょー(hajime)
Рет қаралды 84 МЛН
DELETE TOXICITY = 5 LEGENDARY STARR DROPS!
02:20
Brawl Stars
Рет қаралды 16 МЛН
Купили айфон для собачки #shorts #iribaby
00:31
Khóa ly biệt
01:00
Đào Nguyễn Ánh - Hữu Hưng
Рет қаралды 6 МЛН
Flexbox design patterns you can use in your projects
15:33
Kevin Powell
Рет қаралды 435 М.
Top 10 CSS One Liners That Will Blow Your Mind
13:34
developedbyed
Рет қаралды 905 М.
Avoid these 5 beginner CSS mistakes
21:38
Kevin Powell
Рет қаралды 66 М.
WTF Do These Even Mean
13:44
Web Dev Simplified
Рет қаралды 74 М.
This Is So Much More Than Just A Parent Selector
12:44
Web Dev Simplified
Рет қаралды 43 М.
Getting started with CSS nesting
27:14
Kevin Powell
Рет қаралды 67 М.
You are doing :focus wrong (and I was too)
13:24
Kevin Powell
Рет қаралды 154 М.
Learn flexbox the easy way
34:04
Kevin Powell
Рет қаралды 680 М.
7 ways to deal with CSS
6:23
Fireship
Рет қаралды 1,1 МЛН
1🥺🎉 #thankyou
00:29
はじめしゃちょー(hajime)
Рет қаралды 84 МЛН