javascript snippet for generating inline styles based on a .css file