The ugliness is a feature. Declare HTML components that encapsulate the classes. Then each component is stand-alone WYSIWYG and composes easily with others.
The ridiculous class strings get particularly hilarious when anything beyond basic CSS is used. Want CSS variables? Now it's even less readable!