Right now we have a bunch of custom logic to parse pseudo selector arguments. Although I think this covers all the syntaxes those selectors use in practice today, it's not very future-proof; CSS will probably add more different pseudo selector argument syntaxes in the future that may not fall under our current parsing. To be maximally future-proof, we should parse those arguments using the <declaration-value> production that was added to support custom properties. This will parse any sequence of reasonable characters while still respecting tokenization rules.
Right now we have a bunch of custom logic to parse pseudo selector arguments. Although I think this covers all the syntaxes those selectors use in practice today, it's not very future-proof; CSS will probably add more different pseudo selector argument syntaxes in the future that may not fall under our current parsing. To be maximally future-proof, we should parse those arguments using the
<declaration-value>production that was added to support custom properties. This will parse any sequence of reasonable characters while still respecting tokenization rules.