[BUGFIX beta] Drop classList, treat classes as quoted attributes

Closes #9912 (class ordering) and simplifies classes.

TODO:

* [x] rebase after #9914 lands