When making cosmetic filters, keep this in mind
CSS pseudo elements can't be used with procedural cosmetic filters because querySelectorAll() doesn't work with these.
https://github.com/uBlockOrigin/uBlock-issues/discussions/3424
This also applies to pseudo-classes like :disabled and :hover
The specification states the following about pseudo-elements like ::after and ::before
Note: Authors are advised that while the use of pseudo-elements in selectors is permitted, they will not match any elements in the document, and thus would not result in any elements being returned. Therefore, authors are advised to avoid the use of pseudo-elements in selectors that are passed to the methods defined in this specification.
https://www.w3.org/TR/selectors-api/#grammar
(Behind CloudFlare)
According to https://stackoverflow.com/a/49106279
(behind CloudFlare), ::before and ::after can not be selected because:
Since pseudo-elements do not exist in the DOM, they cannot be accessed in Javascript [sic]
Are :matches-path() and ::after supposed to work together ? · uBlockOrigin uBlock-issues · Discussion #3424
I don't want to file a bug for this. Only a FYI if the limitation isn't intended. I've solved an issue where, on a subreddit on old, the hover effect on the post downvote icon displays the ::after ...