Refactor to change multiple CSS properties in one call