If I correctly understand what you're talking about, I think that your problem has a solution so basic it isn't talked about much. Suppose that (as a contrived example) you want all your spans, unless specified otherwise, to have an ugly teal color. You also want to have some special classes of span, and you want them to be teal (or serif, or whatever) too. You would do something like this:
This makes all spans teal unless you want them to be otherwise. This is, by the way, what CSS means by "Cascading": later definitions override earlier ones where they conflict, but nowhere else.
I'm thinking rather of a 'style snippet' (i.e. a collection of text-formatting settings) that can be applied, in one brief statement, to any style definition anywhere in the tree.
Perhaps such an ability wasn't developed because it doesn't fit within the 'cascading' concept.
Maybe a better explanation would be to compare it to #define in C. Oversimplifying: Define one symbol to represent a collection of instructions at the top of the file, and use that symbol anywhere below. When the interpreter (compiler) reaches an instance of the symbol, it sees the instructions that symbol represents. That (or something similar) is what I want to do here.