move style parsing to style.js