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

I guess it's more important to get `:has()` implemented in browsers sooner, the way it possibly can be implemented. If some reasonable limitation can help it while still allowing to check for dynamic pseudo-classes and DOM modifications inside `:has()`, let it be so. Something would be better than nothing (and yes, limiting `:has()` to scripting only was virtually equal to nothing from CSS engineers perspective).

It's another question whether invalidating `:not()` inside `:has()` would be _that_ much more complicated than, e.g. invalidating `:nth-last-child()` (and the latter case would be definitely useful, the ability to switch the container from block to grid and back depending on the number of items is what developers often ask for). But implementers surely know better, let's listen to them!

Also, I guess the question relates basically to all functional pseudo-classes accepting selector lists, so, if the limitation is needed, `:nth-child(... of S)` would be disallowed as well?



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


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

Received on Tuesday, 18 January 2022 07:31:10 UTC