This Is So Much More Than Just A Parent Selector

  Рет қаралды 44,386

Web Dev Simplified

Web Dev Simplified

Күн бұрын

Пікірлер: 103
@aryavbhola3066
@aryavbhola3066 Жыл бұрын
I never knew we had a parent selector
@mavdotj
@mavdotj Жыл бұрын
Because your adopted /j
@mavdotj
@mavdotj Жыл бұрын
@@321sas ok
@aryavbhola3066
@aryavbhola3066 Жыл бұрын
@@mavdotj 😂 good one
@CoconutwCoco
@CoconutwCoco Жыл бұрын
@@mavdotj I laughed 😅
@mikecronin2415
@mikecronin2415 Жыл бұрын
Until Firefox supports it, I don’t think we yet have parental support. Maybe a court order… (that earlier one WAS good, I laughed too).
@CyberTechBits
@CyberTechBits Жыл бұрын
LOVE your content brother! Always have! Keep it coming! Would be nice to see some advanced tutorials around TABLES.... Like dynamically adding rows, cells with calculations like summing values in a row and calculating totals across row. Maybe incorporating data attributes with reduce etc.. Also would be cool to see tutorial on dynamically dragging rows!
@jenstornell
@jenstornell Жыл бұрын
This selector will simplify the web a whole lot. Great examples!
@dariayudina8463
@dariayudina8463 Жыл бұрын
oh my god, we've been waiting for this selector for almost 10 years! thanks for the video and detailed explanation
@megavolkan
@megavolkan Жыл бұрын
This form thing has just f***ing blew my mind! Thank you so much!!! 🤯
@clevermissfox
@clevermissfox 11 ай бұрын
Bw Web Dev Simplified and Kevin Powell, us KZbin CSS learners would be so lost. They both are so knowledgeable and such great teachers. Very grateful for these guys and their time/effort to put out this content
@Jikodis
@Jikodis 3 ай бұрын
I tried looking at the MDN docs and they did not do a good job explaining this. Thanks for the video!
@joyvideos1802
@joyvideos1802 11 ай бұрын
many usage of this has selector. THanks lot😊
@tommysmith5479
@tommysmith5479 Жыл бұрын
Hey Kyle. Just a talking point. Reagarding your "special-ribbon" example. You say not having to add the "special" class to your containg div makes the code cleaner. I'd argue that it makes the code less intuitive and readable. If the containing div has a class of ""special" then right away the reader knows what's going on. In essence, I'd say readability over cleaner code.
@Hasan23
@Hasan23 Жыл бұрын
Thank you for explaining this thoroughly!
@dominicanfrankster
@dominicanfrankster Жыл бұрын
I'm super excited for 'has' to get more adoption so I can finally use it outside of hobby projects!!
@anaselhassani2545
@anaselhassani2545 Жыл бұрын
Thanks for the tutorial, it's much faster than any other method I came across.
@Yawarr
@Yawarr Жыл бұрын
Thank you, great quick explanation.
@sajjadkazemi
@sajjadkazemi Жыл бұрын
God bless you , I just learnt the thing i was looking for since months ago😍
@whatsapp176
@whatsapp176 Жыл бұрын
Helpline 📲📩⬆️ Questions can come in⬆️
@devkasunlakshitha
@devkasunlakshitha Жыл бұрын
Thank you so much for these tips. Awesome! ❤
@Mmg123-masked12G
@Mmg123-masked12G Жыл бұрын
finally we can highlight a row when hover on a cell in a grid without js :)
@alagunoff
@alagunoff Жыл бұрын
Thanks!
@chezchezchezchez
@chezchezchezchez Жыл бұрын
Brilliant! Thx!
@RaymondFishSC2
@RaymondFishSC2 Жыл бұрын
Great video!
@bijintsy
@bijintsy Жыл бұрын
Thank you ...
@rpf23543
@rpf23543 Жыл бұрын
very nice stuff, thank you!
@MichaelOwens1972
@MichaelOwens1972 Жыл бұрын
11/22/2022 Has selector is 82.92% accepted. woot!
@yassinesafraoui
@yassinesafraoui Жыл бұрын
I had been doing css for years( I stopped recently), and this was something i dreamed of day and night 😭
@whatsapp176
@whatsapp176 Жыл бұрын
Helpline 📲📩⬆️ Questions can come in⬆️
@kohelet910
@kohelet910 Жыл бұрын
CSS:has(Amazing-features) 😃 Thx for this really cool video
@BGdev305
@BGdev305 Жыл бұрын
@WebDevSimplified would love to see more in depth usage of this. Simply because this is powerful enough to remove the need for JS in alot of frontend "design" where one normally needs JS. For example, does this work well with the new CSS Transformations.. Animations?
@PadmanabanScrazy
@PadmanabanScrazy Жыл бұрын
Please explain about BEM CSS methodology
@michelaveline
@michelaveline Жыл бұрын
Super great!
@rahee3036
@rahee3036 Жыл бұрын
Hello Sir! I would like you to make a video on, how to make a responsive website using flex-box or grid-box. Also, I have a question for you, "Is Media Query is always needed to make a fully responsive website?". Thank You. ❤️
@IrvineMesa
@IrvineMesa Жыл бұрын
yes media query will tell the browser what contents to display at different screen size
@TheNatanie
@TheNatanie Жыл бұрын
Hiya, your channel helps a lot! I am only starting my path as a web developer, and I'm happy there is a place to find answers to my questions. So my first web-related question on this channel will be: dooo you have a girlfriend?:)
@padumasu6241
@padumasu6241 Жыл бұрын
haha😂
@m1lk1way1
@m1lk1way1 Жыл бұрын
the only con is that all css selectors work from the end and first it selects all "p" on the page and only after it narrows result relative to the given parent. It is very slow, that's why to have a classes everywhere is the best practice, just not to force browser do this extra kind of work.
@webstercho
@webstercho Жыл бұрын
Firefox likes this tutorial 😄
@Nipaska1
@Nipaska1 Жыл бұрын
Make tutorial video about background images maybe
@ruthang9065
@ruthang9065 Жыл бұрын
2:24 HEY HEY, WHAT ARE YOU DOING?
@whatsapp176
@whatsapp176 Жыл бұрын
Helpline 📲📩⬆️ Questions can come in⬆️
@antonigari7003
@antonigari7003 Жыл бұрын
On the dark mode example, what if you want to have both body and card change, do you just write two :has?
@cyberprompt
@cyberprompt Жыл бұрын
what we need is a :had selector where a child can check if a parent "had" some value, or at least I do since we have situations where during authoring a parent is given inline styling but no new class. so I guess it's still just js for that. and before you ask, no we can't just always request new classes for all situations in a corp CMS environment.
@avoerman89
@avoerman89 Жыл бұрын
Seems like a performance nightmare - browsers would have to track the state of every dom change
@cyberprompt
@cyberprompt Жыл бұрын
@@avoerman89 i'm not talking about past values. i'm saying to easily target a parent element's style value. ie: .parent:: has('color: #ccc') .target { color: #fff }
@cyberprompt
@cyberprompt Жыл бұрын
@@avoerman89 :had would not be a temporal thing, it's the opposite of :has, to the parent, not the child. Like if you wanted to get the style information in JS of a child's parent but in css only.
@codesymphony
@codesymphony Жыл бұрын
selector has amazing applications, but I feel like it would have super resource intensive performance?
@sidneijunior86
@sidneijunior86 Жыл бұрын
I'm learning English and web with your videos. It's very cool indeed!
@whatsapp176
@whatsapp176 Жыл бұрын
Helpline 📲📩⬆️ Questions can come in⬆️
@VladDubovyi
@VladDubovyi Жыл бұрын
We are waiting for :is :where 😀
@afzalbd1
@afzalbd1 Жыл бұрын
Great
@ojichukwuedwin4725
@ojichukwuedwin4725 Жыл бұрын
Great!
@TomasMisura
@TomasMisura Жыл бұрын
i haven't had any idea this selector already exists. css becomes more and more complex and it seems tries to adopt some javascript features
@dopecello8670
@dopecello8670 Жыл бұрын
Can it select my aunts and uncles too?
@TechTalentHive
@TechTalentHive Жыл бұрын
I have a doubt in hover function. Which is the best CSS or Java Script for mouse hover action ?
@mrbsreevijayan8115
@mrbsreevijayan8115 Жыл бұрын
I'm having some troubles in my html could you help me with it
@Mackin7777
@Mackin7777 Жыл бұрын
I'd argue that for example #1, using block element modifier instead of a nested :has makes it more readable and obvious what's going on when looking purely at the markup.
@oldclient
@oldclient Жыл бұрын
New functions has(), is(), not(), where() in combination with calc(), var() and sudo selectors have a huge impact on CSS like Flex and Grid did before. It's a clean and compact architecture to use while choosing between it and Bootstrap, MUI, Tailwind. I did a bunch of tests and its potency is huge.
@mtime6648
@mtime6648 4 ай бұрын
Without it i had used javascript to do or i had to change the position of the elements for the sake of CSS selectors
@rammah
@rammah Жыл бұрын
Nice video
@romanmed9035
@romanmed9035 Жыл бұрын
"has" firefox suuport after on in settings. but "has" is progreessive as "flex".
@whatsapp176
@whatsapp176 Жыл бұрын
Helpline 📲📩⬆️ Questions can come in⬆️
@dasten123
@dasten123 Жыл бұрын
still not supported in Firefox... what are they doing?!
@whatsapp176
@whatsapp176 Жыл бұрын
Helpline 📲📩⬆️ Questions can come in⬆️
@davidturkadze457
@davidturkadze457 Жыл бұрын
has() selector is great, but Firefox does not support it!
@MrGuillermolago
@MrGuillermolago 9 ай бұрын
It will be supported starting on December 19th!
@skylerjknight
@skylerjknight Жыл бұрын
Can't wait until this is fully supported... It's gonna be sick
@andrew0_29_0
@andrew0_29_0 Жыл бұрын
Cool
@fzq8064
@fzq8064 Жыл бұрын
nice
@felixpaniagua6018
@felixpaniagua6018 Жыл бұрын
Can we use it in production yet?
@luislourz
@luislourz Жыл бұрын
You can, though you will need to provide fallbacks with CSS and JS.
@felixpaniagua6018
@felixpaniagua6018 Жыл бұрын
@@luislourz nice
@settahkader
@settahkader Жыл бұрын
not supported with firefox
@urbaniv
@urbaniv Жыл бұрын
A great channel but the room looks as you are imprisoned in a cellar and forced to do YT 😂
@mojorochi
@mojorochi Жыл бұрын
Not sure I'd like putting random things inside of my "has"
@LV4EVR
@LV4EVR Жыл бұрын
Firefox ... ☹
@PaulSebastianM
@PaulSebastianM Жыл бұрын
".box:has(div) p" should be equivalent to ".box > div p" because once you're not targeting the parent, but add a second selector like that (p in this case), you don't need :has. That's at least how it seems, I haven't tested this. :D
@dasten123
@dasten123 Жыл бұрын
nope, in your example without the :has, the must be nested inside the , but it could be a sibling to the div. Plus, in the example with the :has it doesn't matter if the is a _direct_ child of .box
@whatsapp176
@whatsapp176 Жыл бұрын
Helpline 📲📩⬆️ Questions can come in⬆️
@Atlent112
@Atlent112 Жыл бұрын
It's been 7 months, and Firefox is still blocking it for whatever reason, eh...
@ironsand
@ironsand Жыл бұрын
I love real world examples, because they don't ever have semantic HTML tags. 🤣
@MailDeliverySystem-xw6hh
@MailDeliverySystem-xw6hh Жыл бұрын
"If my body has a toggle box between dark and light mode" ~WDS 2022.
@whatsapp176
@whatsapp176 Жыл бұрын
Helpline 📲📩⬆️ Questions can come in⬆️
@Nodsaibot
@Nodsaibot Жыл бұрын
HAS is not really a parent selector, for its not AGNOSTIC, you MUST know what the parent is
@harmez7
@harmez7 Жыл бұрын
hi Kyle, do you still wake up at 5 ?
@telesohbet
@telesohbet Жыл бұрын
Jquery had this since 2008
@ultimapanzer
@ultimapanzer Жыл бұрын
.dad:has(.goneoutforcigarettes)
@mrbsreevijayan8115
@mrbsreevijayan8115 Жыл бұрын
I'm having some troubles in my html could you help me with it
@mrbsreevijayan8115
@mrbsreevijayan8115 Жыл бұрын
I'm having some troubles in my html could you help me with it
@wassupdoc7742
@wassupdoc7742 Жыл бұрын
One thing to notice is firefox doesn't support the has pseudo class
@whatsapp176
@whatsapp176 Жыл бұрын
Helpline 📲📩⬆️ Questions can come in⬆️
@Igor-ge1py
@Igor-ge1py Жыл бұрын
Yup you’re right. Only 76% of the internet users would be able to use this. I’m a couple years should be good.
@aram5642
@aram5642 Жыл бұрын
Wouldn't this be a workaround for the specificity combinator? .box:has(:where(.p1, #p2))
@whatsapp176
@whatsapp176 Жыл бұрын
Helpline 📲📩⬆️ Questions can come in⬆️
@MuhammadAdnan2.0
@MuhammadAdnan2.0 Жыл бұрын
Can we target child:has(parentDiv) ?
@whatsapp176
@whatsapp176 Жыл бұрын
Helpline 📲📩⬆️ Questions can come in⬆️
@BigJim777
@BigJim777 Жыл бұрын
can you do :has not
@pranavwani
@pranavwani Жыл бұрын
Awesome 😎
6 Advanced Flexbox Features You Probably Don’t Know
14:54
Web Dev Simplified
Рет қаралды 116 М.
Master CSS Overflow/Text Wrapping Like A Senior Developer
20:53
Web Dev Simplified
Рет қаралды 54 М.
Players vs Corner Flags 🤯
00:28
LE FOOT EN VIDÉO
Рет қаралды 63 МЛН
когда не обедаешь в школе // EVA mash
00:57
EVA mash
Рет қаралды 2,7 МЛН
Ozoda - Lada (Official Music Video)
06:07
Ozoda
Рет қаралды 10 МЛН
Array Methods in JavaScript | 17 Useful Methods
42:39
DoableDanny
Рет қаралды 56 М.
The new CSS pseudo-classes explained - :is() :where() :has()
13:50
Kevin Powell
Рет қаралды 138 М.
CSS Anchor Is The Best New CSS Feature Since Flexbox
15:39
Web Dev Simplified
Рет қаралды 370 М.
How To Limit Lines Of Text With CSS Only
11:53
Web Dev Simplified
Рет қаралды 114 М.
Top 10 Advanced CSS Responsive Design Concepts You Should Know
20:16
Web Dev Simplified
Рет қаралды 526 М.
This Simple Trick Makes Your Website 83% Better Looking
10:57
Web Dev Simplified
Рет қаралды 392 М.
4 Tips To Succeed As A Self Taught Developer
11:08
Web Dev Simplified
Рет қаралды 42 М.
Are You Making These CSS Height Mistakes?
8:54
Web Dev Simplified
Рет қаралды 131 М.
Players vs Corner Flags 🤯
00:28
LE FOOT EN VIDÉO
Рет қаралды 63 МЛН