Re: [csswg-drafts] [selectors-4] Consider disallowing logical combination pseudo-classes inside :has() (#6952)

The CSS Working Group just discussed `[selectors-4] Consider disallowing logical combination pseudo-classes inside :has()`, and agreed to the following:

* `RESOLVED: Disallow nesting :has() inside :has()`

<details><summary>The full IRC log of that discussion</summary>
&lt;fantasai> Topic: [selectors-4] Consider disallowing logical combination pseudo-classes inside :has()<br>
&lt;fantasai> github: https://github.com/w3c/csswg-drafts/issues/6952https://github.com/w3c/csswg-drafts/issues/6952<br>
&lt;fantasai> futhark: I think there is agreement to allow combinations like :is() and :where()<br>
&lt;fantasai> futhark: But implementors want to disallow :has() inside :has()<br>
&lt;fantasai> bkardell_: I think that's my impression as well. I think Safari implements this way as well<br>
&lt;fantasai> futhark: Implement in chrome and safari, but buggy<br>
&lt;fantasai> futhark: Don't think need to change the spec at this point<br>
&lt;fantasai> futhark: or to add any limitations, other than :has()<br>
&lt;fantasai> TabAtkins: I support this<br>
&lt;TabAtkins> github:<br>
&lt;TabAtkins> github: https://github.com/w3c/csswg-drafts/issues/6952<br>
&lt;fantasai> fantasai: proposed then that :has() cannot be nested inside :has()<br>
&lt;jensimmons> I've already found a useful usecase for figure:not(:has(:not(img))) { ... }<br>
&lt;fantasai> oriol: I think other combinations seem useful, but :has() inside :has() doesn't seem that useful<br>
&lt;fantasai> bkardell_: Originally wanted to disallow all of them, but based on feedback went back and made them work<br>
&lt;fantasai> bkardell_: said some perf implications, but seem livable-with<br>
&lt;fantasai> bkardell_: so let's just prohibit :has() inside :has()<br>
&lt;fantasai> astearns: Other opinions?<br>
&lt;fantasai> RESOLVED: Disallow nesting :has() inside :has()<br>
&lt;TabAtkins> I mean, I'm sure there are use-cases for nested :has(), but they're not as obvious and clearly worth the complexity cost, so I'm happy with this.<br>
</details>


-- 
GitHub Notification of comment by css-meeting-bot
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/6952#issuecomment-1143812466 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Wednesday, 1 June 2022 16:14:44 UTC