fix css property order and trim whitespace