I've made tweaks here, but any sort of conversion that we do is going to be partial at best. There are a lot of permutations that we really can't handle and our validation of style property values is intentionally very loose (as they can refer to other properties, for example).