Support for rules that add and remove classes.