Brain fade: How do you add css properties to a class?

Brain fade: How do you add css properties to a class?

ie. the equivalent of typing them in a style sheet, but doing it dynamically?