Thanks for that.
It's not that the classes themselves are unique to an instance. It's more, I have a lot of very similar, if not identical, HTML and CSS class structures whose only difference is the CSS styles.
Like, for example, blog entries and news entries. Those are basically the same things, except that the CSS *styles* are different. I reuse the HTML for both, only swapping out the root CSS class.
Many of the deeply nested classes are unique to the root class tho, so I could probably use the wild-card char to cut down the repeating classes a lot.
That is:
-
.something { color: #00F; }
-
.root1 .first .second .third .something { color: #F00; }
-
.root2 .first .second .third .something { color: #0F0 }
-
Could in many cases turn into:
-
.something { color: #00F; }
-
.root1 * .third .something { color: #F00; }
-
.root2 * .third .something { color: #0F0 }
-
That might cut down the size of the CSS file a bit.