Re: [csswg-drafts] [selectors-4] Should `:has()` be a complex selector? (#10756)

Or, given that the `:has()` grammar definition accepts a list of relative selectors as argument, I think we could ask this a little differently: "Should a relative selector be a complex selector?"

Then it seems that this edit proposal in https://github.com/w3c/csswg-drafts/issues/5093#issuecomment-1344819653 may cover the `:host(:has(section))` case.
> The [=logical combination pseudo-classes=]
> are allowed anywhere that any other [=pseudo-classes=] are allowed,
> but pass any restrictions to their arguments.
> (For example, if only [=compound selectors=] are allowed,
> then only [=compound selectors=] are valid within an '':is()''.)

Based on the assumption that the above statement will be applied to the `:has()` as well, I think we can say that`:host(:has(section))` will be invalid because the relative selector `section` in the `:has()` is not a compound selector but a complex selector.

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


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

Received on Monday, 19 August 2024 05:30:12 UTC