- From: Ilya Streltsyn via GitHub <sysbot+gh@w3.org>
- Date: Thu, 06 Jul 2023 19:16:14 +0000
- To: public-css-archive@w3.org
If I understod the problem correctly, it's supported, it just doesn't do what many could expect from it 😕 `.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. To select content of `.select` elements except `.deselect` descendants and their subtrees, the new `@scope (.select) to (.deselect)` [rule](https://www.w3.org/TR/css-cascade-6/#scoped-styles) can be used. Alternatively, instead of selecting these elements directly, you can style them through custom properties by seting them for one class and resetting for the other ([example](https://codepen.io/SelenIT/pen/PoxJZjz)). -- GitHub Notification of comment by SelenIT Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/9038#issuecomment-1624190570 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:16:15 UTC