Refactor to change multiple CSS properties with one call