States and classes

I’ve probably been asking for this for 8 years, but here it is again. I’d like for widgets to have optionally one or more sets of classes in addition to states. So for a button, I’d have my active, disabled, loading, etc. states, and then I’d have size classes (small, medium, large) and type classes (primary, secondary, danger, etc.) You might also have states that are contingent on classes, so each type class would have its own separate hover state with a different background color.

This might be useful to solve some of the cross-platform issues as well. If we could insert and remove classes dynamically, that could be the answer to all the challenges of developing cross-platform. We would need a much richer css input for that though.