Re: [csswg-drafts] [css-selectors] has-child selector (#4903)

Regarding the direct child vs. ancestor conversation, I think we agree that most people generally _want_ "ancestor", as deeply nested components are common (and becoming increasingly common with framework-based UI systems).

![IMG_0072](https://user-images.githubusercontent.com/1693164/80651340-c1f93c80-8a43-11ea-83ab-eb69927f5286.PNG)

From a developer experience point of view, `:has` is far superior (A).  Upon implementing `:has-child`(B), we'll likely see a lot of chaining. The example above is simplified, as we're only going "two levels up". This could get much more convoluted, especially if folks are going up and down the tree to apply styles.

That being said, I'd rather have *something* than nothing.


-- 
GitHub Notification of comment by una
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/4903#issuecomment-621493119 using your GitHub account

Received on Wednesday, 29 April 2020 22:13:10 UTC