Turn a JavaScript object with CSS styles into a class in a stylesheet