I'm not 100% sure what you're aiming for. I read this as you want to set class names dynamically on specific terms? If I'm right, take a look at this library here. I use this heavily when it comes to class names under conditions.
Sebastian Thanks for the answer. However, I am looking for something entirely different. I updated my question description to make it visual and more clear. :)