It may be simpler, though less featureful[1], to implement interactive psuedoclasses as if they were psuedoelements. That way when the style tree has been interacted, we can retrieve the altered styles rather than reapply the full stylesheet.
Many other psuedoclasses are equivalent to other selectors, especially if the caller doesn't implement certain interactions.
As such there should be a StyleSheet decorator that can be configure to perform these tasks.
However it is probably wise to discourage such patterns, as they do not communicate necessary state to accessibility tools.