- From: Shaw Jia via GitHub <sysbot+gh@w3.org>
- Date: Thu, 06 Jul 2023 19:52:18 +0000
- To: public-css-archive@w3.org
> It seems that your problem boils down to expecting `.select :is(.deselect *)` to be expanded as `.select .deselect *` exclusively. Unfortunately, it's not how `:is()` works :( That's not the case. I think you're misunderstanding the problem. > `.select *:is(.deselect *)` selects elements that have both `.select` and `.deselect` classes somewhere in their ancestors chain — no matter in which order. Similarly, `.select :not(.deselect *)`searches for elements that have the `.select` ancestor but don't have any `.deselect` ancestor — be it inside _or outside_ the `.select` element in the tree. That is exactly what I want, it's not an unexpected behaviour on my part. Please refer back to my original example: `.select *:not(.select :is(.deselect, .deselect *))` I expect it to be the equivalent of `.select *:not(.select .deselect, .select .deselect *)` But it actually became `.select *:not(.select .deselect, .deselect *)` That's the central problem. How did `:not(.a :is(.b, .b *)` become `:not(.a .b, .b *)` instead of `:not(.a .b, .a .b *)`? -- GitHub Notification of comment by miragecraft Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/9038#issuecomment-1624229546 using your GitHub account -- Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Thursday, 6 July 2023 19:52:20 UTC